react-native 代码编写错误-- Cannot add a child that doesn't have a YogaNode to a parent without a measure function!

Cannot add a child that doesn't have a YogaNode to a parent without a measure function!

请注意,这个错误是代码的编写错误,例如json的变量没有判断空值,直接使用switch这样的方法,导致后续的代码没有执行或者,执行出错。

遇到这个错误,

第一步:请检查代码是否有返回完整的View,

第二步:检查返回View前的代码是否中断报错,多留意空值的处理

你可能感兴趣的:(react-native 代码编写错误-- Cannot add a child that doesn't have a YogaNode to a parent without a measure function!)