目前,当我按下 android 硬件返回键时,react 路由器 Flux 将调用 Actions.pop() 方法。有没有办法阻止它调用阻止返回上一个场景的方法,因为我想跳转到其他场景。从示例场景A到场景B,场景B到场景C,当在场景C中按下返回键时,我想去场景A。我试过了
componentWillMount() {
// Disable back button by just returning true instead of Action.pop()
BackAndroid.addEventListener('hardwareBackPress', () => {
return true;
});
};