React Native Router Flux: navigate from main scene to child

前端 未结 2 1329
野性不改
野性不改 2021-01-12 07:47

Version

  • react-native-router-flux v3.35.0
  • react-native v0.31

I have few scenes. one of scenes have few sub-scenes. how can i navigate

相关标签:
2条回答
  • 2021-01-12 08:18

    I've found that you can switch to inner tabs if you navigate to the tabbar first, e.g.:

    <Button onPress={() => {
        Actions.tabbar({type:ActionConst.RESET});
        Actions.courses();
    }} title="See Courses" />
    

    The first scene transition resets the scene to your tab bar, and would by default show your initial scene, the second transition then replaces your current scene due to how react-native-router-flux handles tab scene transitions.

    0 讨论(0)
  • 2021-01-12 08:21

    I actually answered a very similar question here. The problem is that from the context of login you'd have access to Actions.tabbar and it would then route you to either a nested scene with the initial prop set to true, or the first nested scene in the stack. To see an example of what I am talking about refer to the link I included in the first line of this answer.

    Hope this helps! :)

    0 讨论(0)
提交回复
热议问题