标签:nat react tac 遇到 export navigator col logs es2017
Element type is invalid:expected a string (for built-in compoenets)or a class/function (for composite components)but got:undefined....
这个错,是说没有export出要使用的组件,可是我找了好久,没有发现到底是什么原因引起。
这个组件在
看网上说可以
import List_view from ‘./scene/mine/List‘
替换成下面这样,引入。我试了并没有用。
import {List_view} from ‘./scene/mine/List‘
经过层层剥离试验,发现问题出在这段代码里面,这里就不贴代码了,就只分析下这个
StackNavigator方法里为什么出错呢?
const RN1 = StackNavigator({ Home: { screen: HomeScene, navigationOptions: { title: ‘My Chats‘, }, }, Profile: {screen: List_view}, });
突然的好了,一头雾水的好了。
最后发现是自定义的
tabBarIcon和 NavigationItem 引入有问题。
标签:nat react tac 遇到 export navigator col logs es2017
原文地址:http://www.cnblogs.com/Stone-Yuan/p/7662352.html