React native: Cannot add a child that doesn't have a YogaNode or parent node

后端 未结 14 2192
忘掉有多难
忘掉有多难 2021-02-01 02:22

Just started learning react-native,

I have created one separate file flexdemo.js and created component as below:

import React, { Component } from \'react         


        
14条回答
  •  清歌不尽
    2021-02-01 02:31

    This error is usually from one of below mistakes

    • Remove unnecessary comments and remove comments from return function.
    • check for proper variable name.
    • check for unintended semicolon or any wrong syntax

提交回复
热议问题