In React Native using react-native-router-flux, when I try to hide the nav bar all the components disappear. Here is my code :
<Router>
<Stack key="root" >
<Scene key="login" component={Login} title="Login" initial={true} hideNavBar={true}/>
<Scene key="signup" component={Signup} title="Signup" />
</Stack>
</Router>
I tried other alternative solutions but still have the same problem.
after looking through your snack, i realise that the parent <View />
component under App.js
seem to be causing the issue without any error flags. by removing it, the components have reappeared. i would suggest that you add the css styling to each Scene
separately, which would also give you granular control. or you probably have to rework your components in order to have a base styling theme. this is the updated snack.
using ^4.2.0
of react-native-router-flux
, i am able to replicate your above example without any issue of components disappearing upon setting hideNavBar
prop to true. as i do not have the code to your components, i am using a basic View
with a Button
for navigating between the stack's scenes.
i have included a snack here so that you can take a look and see what went wrong. :)