React native 无法在现有状态转换期间使用react native router flux进行更新
我需要使用RNRF显示一个模态,但是我得到了这个警告(模态显示了一会儿,然后用警告消失) 如果我将场景的type prop设置为“replace”,那么一切都会正常工作,但我无法在该场景(最后一个)中执行Actions.pop()React native 无法在现有状态转换期间使用react native router flux进行更新,react-native,react-native-android,react-native-navigation,react-native-router-flux,React Native,React Native Android,React Native Navigation,React Native Router Flux,我需要使用RNRF显示一个模态,但是我得到了这个警告(模态显示了一会儿,然后用警告消失) 如果我将场景的type prop设置为“replace”,那么一切都会正常工作,但我无法在该场景(最后一个)中执行Actions.pop() const-App=()=>{ 返回( { goBack(); 返回true; }} > ); }; 最后一个场景指的是“关于”组件。它在render方法中有一个带有onPress属性的按钮,调用了goBack()。没有支架,效果很好 const App = () =
const-App=()=>{
返回(
{
goBack();
返回true;
}}
>
);
};
最后一个场景指的是“关于”组件。它在render方法中有一个带有onPress属性的按钮,调用了goBack()。没有支架,效果很好
const App = () => {
return (
<Provider store={store}>
<Router
backAndroidHandler={() => {
goBack();
return true;
}}
>
<Modal>
<Stack key="root" hideNavBar={true}>
<Scene
key={ROUTES.LOGIN}
type="push"
duration={1}
component={Login}
duration={1}
initial={true}
/>
<Scene
key={ROUTES.TRANSACTION_SUMMARY}
type="push"
duration={1}
component={TransactionSummary}
duration={1}
/>
<Scene
key={ROUTES.PHOTO_DIALOGUE}
type="push"
duration={1}
component={PhotoDialogue}
duration={1}
/>
</Stack>
<Scene modal key={ROUTES.ABOUT} type="push" component={About} hideNavBar />
</Modal>
</Router>
</Provider>
);
};