请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

navigator跳转时出错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
 
Check the render method of `Navigator`.
 
instantiateReactComponent
    instantiateReactComponent.js:88:8
instantiateChild
    ReactChildReconciler.js:57:53
traverseAllChildrenImpl
    traverseAllChildren.js:84:6
instantiateChildren
    ReactChildReconciler.js:88:8
_reconcilerInstantiateChildren
    ReactMultiChild.js:180:12
mountChildren            
    ReactMultiChild.js:250:6
initializeChildren
    ReactNativeBaseComponent.js:67:41
mountComponent
    ReactNativeBaseComponent.js:169:6
mountComponent
    ReactReconciler.js:58:6
performInitialMount
    ReactCompositeComponent.js:519:6
mountComponent
    ReactCompositeComponent.js:350:8
mountComponent
    ReactReconciler.js:58:6
updateChildren
    ReactChildReconciler.js:165:10
_reconcilerUpdateChildren
    ReactMultiChild.js:212:10
_updateChildren
    ReactMultiChild.js:353:6
updateChildren
    ReactMultiChild.js:339:25
receiveComponent
    ReactNativeBaseComponent.js:119:24
receiveComponent
    ReactReconciler.js:159:38
_updateRenderedComponentWithNextElement
    ReactCompositeComponent.js:1129:8
_updateRenderedComponent
    ReactCompositeComponent.js:1100:6
_performComponentUpdate
    ReactCompositeComponent.js:1036:36
updateComponent
    ReactCompositeComponent.js:921:8
receiveComponent
    ReactCompositeComponent.js:753:6
receiveComponent
    ReactReconciler.js:159:38
updateChildren
    ReactChildReconciler.js:144:10
_reconcilerUpdateChildren
    ReactMultiChild.js:212:10
_updateChildren
    ReactMultiChild.js:353:6
updateChildren
    ReactMultiChild.js:339:25
receiveComponent
    ReactNativeBaseComponent.js:119:24
receiveComponent
    ReactReconciler.js:159:38
_updateRenderedComponentWithNextElement
    ReactCompositeComponent.js:1129:8
_updateRenderedComponent
    ReactCompositeComponent.js:1100:6
_performComponentUpdate
    ReactCompositeComponent.js:1036:36
updateComponent
    ReactCompositeComponent.js:921:8
receiveComponent
    ReactCompositeComponent.js:753:6
receiveComponent
    ReactReconciler.js:159:38
_updateRenderedComponentWithNextElement
    ReactCompositeComponent.js:1129:8
_updateRenderedComponent
    ReactCompositeComponent.js:1100:6
_performComponentUpdate
    ReactCompositeComponent.js:1036:36
updateComponent
    ReactCompositeComponent.js:921:8
performUpdateIfNecessary
    ReactCompositeComponent.js:778:8
performUpdateIfNecessary
    ReactReconciler.js:209:46
runBatchedUpdates
    ReactUpdates.js:150:6
perform
    Transaction.js:149:24
perform
    Transaction.js:149:24
flushBatchedUpdates
    ReactUpdates.js:168:24
closeAll
    Transaction.js:222:29
perform
    Transaction.js:163:24
batchedUpdatesWithControlledComponents
    ReactGenericBatching.js:51:26
_receiveRootNodeIDEvent
    ReactNativeEventEmitter.js:111:40
receiveTouches
    ReactNativeEventEmitter.js:200:8
__callFunction
    MessageQueue.js:244:47
<unknown>
    MessageQueue.js:108:26
guard
    MessageQueue.js:46:4
callFunctionReturnFlushedQueue
    MessageQueue.js:107:10


正在回答

插入代码

3回答

仰慕傻瓜帮 2017-04-22 17:23:17

Navigator 中的 initialRoute 中的component 首字母要要小写,你大写了

0 回复 有任何疑惑可以回复我~
  • 提问者 嘉良 #1
    后来发现了,被编辑器提示坑了。非常感谢!
    回复 有任何疑惑可以回复我~ 2017-04-23 02:43:25
CrazyCodeBoy 2017-04-20 09:09:08

上面提示元素类型错误,你是不是忘记导出和导入组件了呢

0 回复 有任何疑惑可以回复我~
  • 提问者 嘉良 #1
    晚点回去把代码贴给你看看
    回复 有任何疑惑可以回复我~ 2017-04-20 10:19:05
  • 提问者 嘉良 #2
    http://img1.sycdn.imooc.com/szimg//58f8a34d00012afd10341340.jpg
    http://img1.sycdn.imooc.com/szimg//58f8a34f0001599a11801148.jpg
    ​
    回复 有任何疑惑可以回复我~ 2017-04-20 20:02:51
提问者 嘉良 2017-04-20 20:04:26

https://img1.sycdn.imooc.com/szimg//58f8a39b0001599a11801148.jpg

https://img1.sycdn.imooc.com/szimg//58f8a39b00012afd10341340.jpg

找不到出错在哪里,麻烦看下

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号