Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用react native router flux在模式内进行导航_Javascript_React Native - Fatal编程技术网

Javascript 如何使用react native router flux在模式内进行导航

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本机应用程序的一个模式中有一个导航

使用新版本的
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组件。谢谢,我也要这么做。