【发布时间】:2017-11-11 18:51:24
【问题描述】:
我在 react native 项目 (0.43.3) 中使用路由器通量
如何在第一次按下图标时切换选项卡并在第二次按下时重置此选项卡上的堆栈?
例子:
1. In: tab1
2. Press tab2-icon => switch to tab2 (scene tab2 must be showed)
3. Press tab1-icon => switch to tab1 (scene tab1 must be showed, just as it had been)
4. Press tab1-icon => switch to tab1 (scene tab 1 must be reload with a different prop)
我尝试将动作添加到 onPress <Scene onPress={() => { /* CODE */ }} ...> 的场景中,但丢失(覆盖或替换)路由器通量标签栏自己的动作(如显示场景组件,标记为活动,更改标签栏项目的颜色)。
也许如果我可以在 onPress y 默认值中按下 tabbar 时添加操作,然后我的代码会这样做
@mantir 在 repo 中的原始问题:https://github.com/aksonov/react-native-router-flux/issues/1905
【问题讨论】:
标签: react-native redux router flux tabbar