question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hideTabBar is broken when used in nested stacks/scenes

See original GitHub issue

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>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
daviscabralcommented, Aug 23, 2018

That is working in the Example code with the most recent version.

Image from Gyazo

screenshot 2018-08-23 05 10 48

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.

1reaction
arribbarcommented, Sep 20, 2018

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I selectively hide Tabs with nested StackNavigators ...
In order to hide a tabBar on one of the tabs, you can set this option to true. It's been recently documented. Is...
Read more >
SwiftUI hide TabBar in subview - Stack Overflow
Traverse the allsubview of the window to hide the UITabBar. You can write it as ViewModifier and use it in SwiftUI or use...
Read more >
Hiding tab bar in specific screens - React Navigation
Sometimes we may want to hide the tab bar in specific screens in a stack navigator nested in a tab navigator. Let's say...
Read more >
How to hide the tab bar when a view controller is shown
If you don't want that behavior, you should set hidesBottomBarWhenPushed to true where applicable. This will hide the tab bar along with any ......
Read more >
Scene view navigation - Unity - Manual
Flythrough mode; Camera speed; Movement shortcuts. Arrow movement. You can use the Arrow Keys to move around the Scene as though “walking” through ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found