我在命令react-native run-android
启动应用程序后才有一个错误。关闭远程调试时会出现错误。使用调试器所有工作都正确。
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
libs的版本
" react-dom":" 〜15.3.2","反应本":"^0.39.2",
在我的情况下,我们将这个神秘的虫子拖到了几周内,出现在Android build上,而无需随附的调试器,如您所述
culprit 是
import 'core-js'
在我们的根部成分上, polyfill 似乎正在弄乱事物
只需删除导入行并尝试一下
package.json
的相关部分
"react-native": "0.44.2",
"react": "16.0.0-alpha.6",