react native 报错:cannot add a child that doesnot have a YogoNode to a parent without a measure function!
如图:
原因是:
1.该错误一般是因为render方法中注释语句写法不正确,render的return函数里面的注释语句应该写在 {} 里面,而不是直接 //,正确写法:{/*注释语句 */}
2.有字符串没有写在Text里面,字符串一定只能写在Text里面
react native 报错:cannot add a child that doesnot have a YogoNode to a parent without a measure function!
如图:
原因是:
1.该错误一般是因为render方法中注释语句写法不正确,render的return函数里面的注释语句应该写在 {} 里面,而不是直接 //,正确写法:{/*注释语句 */}
2.有字符串没有写在Text里面,字符串一定只能写在Text里面