装了navigation 编译后报错
import { StackNavigator } from 'react-navigation';
class ComponentLogin extends Component{
constructor(props){
super(props);
this.state = {
text:'用户'
};
}
static navigationOptions = {
title: 'Welcome'
};
render(){
// const { navigate } = this.props.navigation;
return(
<View>
<Text>test</Text>
</View>
)
}
}
//导航注册
const App = StackNavigator({
Home: {screen: ComponentLogin},
// Profile: {screen: controlPage},
});
//app注册
AppRegistry.registerComponent('App', () => App);
安装后 引用上就报错,求各位大神看看
你这是全部代码嘛 看看版本是多少