React-native-router-flux: Double navBar on nested Scenes

Created on 20 Jul 2017  路  7Comments  路  Source: aksonov/react-native-router-flux

Hello, and thank you for great work.

My version 4.0.0-beta.12:

My router is:

<Router>
            <Scene key="root">
                <Scene key="auth">
                    <Scene key="login" component={LoginForm} title="Please Login"/>
                </Scene>
                <Scene key="main">
                    <Scene key="employeeList" component={EmployeeList} title="Employees"/>
                </Scene>
            </Scene>
 </Router>

and in emulator i see this issue:
2017-07-20_1753

as you can see i have 2 headers - i suppose - one for "auth" and one for "login".
How can i disable one of them?
if i put hideNavBar to the parent or to the child - as result i dont see navBar at all.

And another question - if i want after login redirect user to the "employeeList", and i dont want that user will have BACK button at the navigation - how i can achieve this?

Thank you

Most helpful comment

Set hideNavBar on root.

All 7 comments

Set hideNavBar on root.

Ohh, thanks ))
what about 2nd question?

Oh, sorry, now the back button is gone.
Issue closed

I love you #luco

I love u @luco u saved my ass. Stephen Grider too? @aksonov

thanks @luco

Hey!
I'm also going through Stephen Grider's tutorials and I just had this problem. the hidNavBar thing didn't work for me. But I realized that sceneStyle={{ paddingTop: 65 }} on the Router caused it. without it there's no problem. I guess you should do the styling for the nested scenes only. Setting it in the Router also applies it to root and it doubles.
I notice that you didn't use the styling in your router but there is one in Stephen's example.
thought it could help others.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maphongba008 picture maphongba008  路  3Comments

kirankalyan5 picture kirankalyan5  路  3Comments

moaxaca picture moaxaca  路  3Comments

xnog picture xnog  路  3Comments

sreejithr picture sreejithr  路  3Comments