Javascript 如何使用react native router flux在模式内进行导航
我需要在react本机应用程序的一个模式中有一个导航 使用新版本的Javascript 如何使用react native router flux在模式内进行导航,javascript,react-native,Javascript,React Native,我需要在react本机应用程序的一个模式中有一个导航 使用新版本的react native router flux,似乎不可能做到这一点。我可以创建一个垂直动画来显示下一个场景,这与在场景顶部创建一个模式不同 <Scene key="login" direction="vertical"> <Scene key="loginModal" component={Login} schema="modal" title="Login"/>
react native router flux
,似乎不可能做到这一点。我可以创建一个垂直动画来显示下一个场景,这与在场景顶部创建一个模式不同
<Scene key="login" direction="vertical">
<Scene key="loginModal" component={Login} schema="modal" title="Login"/>
<Scene key="loginModal2" hideNavBar={true} component={Login2} title="Login2"/>
</Scene>
然后,在LoginModal
中,将呈现如下内容:
{/* LoginModal would be a wrapper which can render children */}
<Scene key="login" component={LoginModal}>
<Scene key="loginModal" component={Login} title="Login"/>
<Scene key="loginModal2" hideNavBar={true} component={Login2} title="Login2" panHandlers={null} duration={1}/>
</Scene>
render(){
return (
<Modal animated={true} transparent={true} visible={true}>
{/* Render the scene that needs to be rendered,
including the navigation bar */}
{this.props.children}
</Modal>
);
render(){
返回(
{/*渲染需要渲染的场景,
包括导航栏*/}
{this.props.children}
);
有没有一种方法可以实现这一点?或者你知道有没有更好的方法为react native创建一个类似的路由系统
谢谢。您坚持使用react native router flux吗?我没有,我正在使用native Navigator组件。谢谢,我也要这么做。