反应本机 Wix Navigation.push 可能未处理的承诺拒绝:错误:无法执行堆栈命令
登录.js
signUpLink =(screenName) => {
Navigation.push(this.props.componentId, {
component: {
name: screenName,
}
});
}
<TouchableOpacity style={styles.buttonText} onPress={this.signUpLink('videostreme.SignUpScreen')}>
<Text style={styles.signUpText} >First time here?? Sign Up</Text>
</TouchableOpacity>
index.js
Navigation.registerComponent('videostreme.LoginScreen', () => Login);
Navigation.registerComponent('videostreme.MainScreen', () => Main);
Navigation.registerComponent('videostreme.SignUpScreen', () => SignUp);
Navigation.registerComponent('videostreme.SplashScreen', () => Splash);
Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack: {
children: [
{
component: {
name: 'videostreme.MainScreen'
}
},
]
}
}
})
})
如何处理这个承诺(Navigation.push),有人知道这个吗?