【发布时间】:2017-05-23 12:09:39
【问题描述】:
我尝试在我的应用中使用 react-native-drawer (https://github.com/root-two/react-native-drawer) 与 react-native-router-flux
根据documentation,我已将带抽屉的场景添加到路由器:
import NavigationDrawer from './scenes/NavigationDrawer';
import MetricsScene from './scenes/MetricsScene';
...
<Router>
<Scene key="root">
<Scene key="login"
component={LoginScene}
hideNavBar={true}
initial
/>
<Scene key="drawer" component={NavigationDrawer} open={false} >
<Scene key="metrics" component={MetricsScene}/>
</Scene>
</Scene>
</Router>
在我的 LoginScene 中我调用:
Actions.metrics({type: ActionConst.RESET});
按下登录按钮后,没有任何反应。
有什么想法吗?提前致谢。
【问题讨论】:
标签: react-native react-native-router-flux react-native-drawer