react-native-navigation | Setting initial screen without putting it as tab?

岁酱吖の 提交于 2019-12-24 12:09:47

问题


I want to set initial screen on my react native app, but without putting it as a tab.

I mean I want to be able to reach the navigator.push outside a screen, something like this.

Navigation.startTabBasedApp({
  tabs: [
    screen: 'Signup'
  ]
})

Navigator.push({
  screen: 'Landing',
})

回答1:


See this doc https://wix.github.io/react-native-navigation/#/top-level-api

You need to use Navigation.startSingleScreenApp. Next, if u need open tab bar, just call Navigation. startTabBasedApp from anywhere in your application.

https://wix.github.io/react-native-navigation/#/screen-api

Also, you can try resetTo(params)



来源:https://stackoverflow.com/questions/46060091/react-native-navigation-setting-initial-screen-without-putting-it-as-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!