react-native-router-flux: hideTabBar is broken when used in nested stacks/scenes
Version
Tell us which versions you are using:
- react-native-router-flux v4.0.2 (latest master)
- react-native v0.56.0 (Example App)
Expected behaviour
hideTabBar on any Scene hides TabBar when that Scene is presented (as previously)
Actual behaviour
TabBar keeps on showing
Steps to reproduce
Slightly modified the Example app, added tabs
to the root Stack, and added hideTabBar
to the register Scenes, I have the same structure in my app. Previously using 4.0.0-beta.28, TabBar was hidden when the Scene with hideTabBar
got presented, now it isn’t.
<Stack hideNavBar tabs key="root" titleStyle={{ alignSelf: 'center' }}>
<Scene key="echo" back clone component={EchoView} getTitle={({ navigation }) => navigation.state.key} />
<Scene key="launch" component={Launch} title="Launch" initial />
<Stack key="customNavBar" hideTabBar titleStyle={{ alignSelf: 'center' }}>
<Scene key="customNavBar1" title="CustomNavBar 1" navBar={CustomNavBar} component={CustomNavBarView} back />
<Scene key="customNavBar2" title="CustomNavBar 2" navBar={CustomNavBar} component={CustomNavBarView} back />
<Scene key="customNavBar3" title="Another CustomNavBar" navBar={CustomNavBar2} component={CustomNavBarView} back />
<Scene key="hiddenNavBar" title="hiddenNavBar" component={CustomNavBarView} hideNavBar={true} back />
</Stack>
<Stack back backTitle="Back" key="register" duration={0} navTransparent>
<Scene key="_register" hideTabBar component={Register} title="Register" />
<Scene key="register2" hideTabBar component={Register} title="Register2" />
<Scene key="home" component={Home} title="Replace" type={ActionConst.REPLACE} />
</Stack>
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 16 (1 by maintainers)
That is working in the
Example
code with the most recent version.Please, take a look there, and in case you found a bug, or was able to reproduce this there, reopen this ticket with the failing example.
I still got the problem. I tried your solution @daviscabral but it didn’t work in my case. I’ll try to investigate in the next few days, starting by your updated example.
Thank you for your time 😃