React native 启动而不调试时反应本机错误
在应用程序通过命令React native 启动而不调试时反应本机错误,react-native,React Native,在应用程序通过命令react native run android启动后,我发现了一个bug。关闭远程调试时出现错误。使用调试器,所有工作都正常 Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array
react native run android
启动后,我发现了一个bug。关闭远程调试时出现错误。使用调试器,所有工作都正常
Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `View`.
traverseAllChildrenImpl
traverseAllChildren.js:183
traverseAllChildrenImpl
traverseAllChildren.js:102
traverseAllChildren
traverseAllChildren.js:218
instantiateChildren
ReactChildReconciler.js:86
_reconcilerInstantiateChildren
ReactMultiChild.js:179
mountChildren
ReactMultiChild.js:249
initializeChildren
ReactNativeBaseComponent.js:74
mountComponent
ReactNativeBaseComponent.js:211
mountComponent
ReactReconciler.js:61
performInitialMount
ReactCompositeComponent.js:495
mountComponent
ReactCompositeComponent.js:346
mountComponent
ReactReconciler.js:61
performInitialMount
ReactCompositeComponent.js:495
mountComponent
ReactCompositeComponent.js:346
mountComponent
ReactReconciler.js:61
performInitialMount
ReactCompositeComponent.js:495
mountComponent
ReactCompositeComponent.js:346
mountComponent
ReactReconciler.js:61
mountComponentIntoNode
ReactNativeMount.js:54
perform
Transaction.js:149
batchedMountComponentIntoNode
ReactNativeMount.js:77
perform
Transaction.js:149
batchedUpdates
ReactDefaultBatchingStrategy.js:65
batchedUpdates
ReactUpdates.js:111
renderComponent
ReactNativeMount.js:141
render
ReactNative.js:31
renderApplication
renderApplication.js:33
run
AppRegistry.js:76
runApplication
AppRegistry.js:105
__callFunction
MessageQueue.js:236
<unknown>
MessageQueue.js:108
guard
MessageQueue.js:46
callFunctionReturnFlushedQueue
MessageQueue.js:107
对象作为React子对象无效(找到:具有键{$$typeof,type,key,ref,props,_owner,_store}的对象)。如果要呈现子对象集合,请改用数组,或使用React附加组件中的createFragment(object)包装对象。检查“视图”的渲染方法。
遍历儿童impl
traverseAllChildren.js:183
遍历儿童impl
traverseAllChildren.js:102
穿越儿童
traverseAllChildren.js:218
幼儿
ReactChildReconciler.js:86
_调和斯坦丁儿童
ReactMultiChild.js:179
山区儿童
ReactMultiChild.js:249
初始化儿童
ReactNativeBaseComponent.js:74
挂载组件
ReactNativeBaseComponent.js:211
挂载组件
ReactReconciler.js:61
性能计数
ReactCompositeComponent.js:495
挂载组件
ReactCompositeComponent.js:346
挂载组件
ReactReconciler.js:61
性能计数
ReactCompositeComponent.js:495
挂载组件
ReactCompositeComponent.js:346
挂载组件
ReactReconciler.js:61
性能计数
ReactCompositeComponent.js:495
挂载组件
ReactCompositeComponent.js:346
挂载组件
ReactReconciler.js:61
MountComponentNode
ReactNativeMount.js:54
表演
Transaction.js:149
BatchedMountComponentNode
ReactNativeMount.js:77
表演
Transaction.js:149
批量更新
ReactDefaultBatchingStrategy.js:65
批量更新
ReactUpdates.js:111
渲染组件
ReactNativeMount.js:141
提供
ReactNative.js:31
渲染应用
renderApplication.js:33
跑
AppRegistry.js:76
运行应用程序
AppRegistry.js:105
__调用函数
MessageQueue.js:236
MessageQueue.js:108
警卫
MessageQueue.js:46
callFunctionReturnFlushedQueue
MessageQueue.js:107
libs的版本
“反应dom”:“~15.3.2”,
“react-native”:“^0.39.2”,在我使用react-native的情况下,我们将这个神秘的错误拖了几个星期,只出现在Android版本上,没有如您所述的附加调试器 罪魁祸首是一名罪犯
导入“核心js”
在我们的根组件上,polyfill似乎把事情搞砸了
只需删除导入行并尝试一下
package.json的相关部分
"react-native": "0.44.2",
"react": "16.0.0-alpha.6",
你找到问题的答案了吗?谢谢-我在RN 0.55.3中,这发生在我身上。结果我有:从“core js”导入{Promise};你是救命恩人。我也犯了同样的错误,几乎不可能找到。当我注释出导入“babel polyfill”时代码>错误消失。谢谢你帮我缩小了这个范围。