在我的主应用页面中:
const App = StackNavigator({ sign-up: { screen: Signup }, });
注册页面上的:
const { navigate } = this.props.navigation;
<Text onPress={() => navigate(‘sign-up’)} Sign Up</Text>
我错过了什么?
答案 0 :(得分:4)
像this github问题评论中提到的那样使用它:
const SimpleApp = StackNavigator({
Home: { screen: HomeScreen },
});
AppRegistry.registerComponent('SimpleApp', () => SimpleApp);