-
Notifications
You must be signed in to change notification settings - Fork 113
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
There's no way to hide the tabBar as you can in react navigation #518
Comments
did you find any solution to hide tabs? The documentation specifies that you can hide a tab by adding the href property as null in the options of the tabs.Screen. |
Hide tabBar for some screens:
@QuesoCaliente was mentioning this: https://expo.github.io/router/docs/guides/tabs/, and it is shown above: (root) tab/ tabIcon would not be shown in tab bar |
@QuesoCaliente yes I see how to hide a page itself, that’s not the problem, I wanted to automatically hide the tab bar when pushing a new page on the stack this worked well before expo-router Ill try this - I don’t know if this goes in a different issue but likewise when I have this stack navigators in the stack and push it duplicates the header and the back button isn’t propagated up to the top Nav bar, but this works out of the box in react navigation Main Stack
When I push a page on top of the stack in tab 1 stack it goes inside the navigator and thus duplicates the header, I know I can hide the hide on one or the other but then every page will require conditional logic, whereas I just want the pushed page to be on top, ideally both without the tab bar and with its header, which would have the correct title and back button Please let me know if you want to make a different issue but I think these are interrelated |
You can achieve this by using the same structure described in React Navigation Docs https://reactnavigation.org/docs/hiding-tabbar-in-screens/, simply nest your
|
I made it work using this:
|
I can't get this to work. Have anyone had success? usePathname changes during re-render but the last result is the main tab, not the child one |
its works to me .
|
I use this to hide tab bar
|
can you please explain to me? how do you achieve this |
This works, its a bit buggy. The Tab bar leaves when going into the nested screen as it should, but the background seems to stay sometimes interrupting the view. |
I would really appreciate a hook like the one in react-navigation where you can simply do:
|
is there an official solution for that? |
Any updates on this? It should not be closed, the issue is not resolved. |
There are some workarounds as mentioned above, however, I consider that the ideal solution would be something like the one implemented in react navigation, this should definitely not be marked as closed.
|
Still looking for a proper solution 👀 |
It appear that the only soultion is to hide the tab bar based on state and update that state (if we want to hide it dynamicly) from the target place based on a context or gloabl state library. I think this is not making sense because it is a lot of work and complexity for a simple task. There is should be a hook similar to react navigation. All the previous comments suggest to hide it staticlty on certine page but what if we want to do that dynamicly |
This is working for me on Android & iOS. If you have troubles on iOS with blank space use:
See here: react-navigation/react-navigation#10432 Please reopen this issue. |
It needs to be done using an imperative way, let's say you have a screen where the user can enter full screen by tapping the screen twice. |
This works, but when returning to a route with the tab bar visible, the tab bar takes a second to reappear. Is there a cleaner way to do it? |
const segments = useSegments(); // should this be used for typescript? <Tabs |
While this works, it still leaves a blank empty space at the bottom The code from @mleister97 doesn't seems to get rid of the blank space originally ocuppied by the tabbar Tried to set height too from the 'setHidden' flag but that also doesn't work |
At least in my case it seems that the Looks like it needs some more renders to achieve it? |
<Tabs.Screen
name="index"
options={{
tabBarItemStyle: {
display: 'none',
},
}}
/> worked for me |
Which package manager are you using? (Yarn is recommended)
None
Summary
The tabBar option wasn't ported over so there is no good way to hide the tabBar
Minimal reproducible example
n/a - this is easy to do in react navigation
The text was updated successfully, but these errors were encountered: