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

后端 未结 14 2493
忘掉有多难
忘掉有多难 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:36

    In my case I had small () brackets around one of my view which was causing error.

    ({renderProgress()})
    

    Removing small brackets worked for me.

    {renderProgress()}

提交回复
热议问题