Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested scene + navbar ? #2586

Closed
matthieupinte opened this issue Nov 2, 2017 · 1 comment
Closed

Nested scene + navbar ? #2586

matthieupinte opened this issue Nov 2, 2017 · 1 comment

Comments

@matthieupinte
Copy link

  • react-native-router-flux v^4.0.0-beta.22
  • react-native v^0.49.3

Hi, I'm trying to got a navbar back button on a scene... but nothing is displayed.
I saw all current issues, but didn't find answer to my questions... maybe you can help me :

Here my routes :

<RouterWithRedux>
  <Stack
    key="root"
    navigationBarTitleStyle={styles.navBar}
    hideNavBar
  >
    <Scene key="home" component={Home} initial />
    <Stack key="register" back>
      <Scene key="login" component={Login} title="Se connecter" />
    </Stack>
    <Scene
      key="sceneOne"
      component={SceneOne}
      hideNavBar={false}
    />
    <Scene key="sceneTwo" component={SceneTwo} />
  </Stack>
</RouterWithRedux>

and when I on Home page, I just Actions.sceneOne()
...

Don't know what I'm missing...

ps: If I don't push hideNavBar on route stack, I will have a double navbar on scene login :/

@matthieupinte
Copy link
Author

I tried something that seems to work, if you have the problem just add a "new stack" between the root and your other scenes :

<RouterWithRedux>
  <Stack
    key="root"
    navigationBarTitleStyle={styles.navBar}
    hideNavBar
  >
    <Stack key="main" initial>
      <Scene key="home" component={Home} initial hideNavBar />
      <Scene key="sceneOne" component={SceneOne} />
      <Scene key="sceneTwo" component={SceneTwo} />
    </Stack>
    <Stack key="register" back>
      <Scene key="login" component={Login} title="Se connecter" />
    </Stack>
  </Stack>
</RouterWithRedux>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant