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.

How to hide tabbar item in tabs

See original GitHub issue

Version

  • react-native-router-flux v4.0.0 (v3 is not supported)
  • react-native v0.45.1

Expected behaviour

222222

Actual behaviour

1527579578082

Steps to reproduce

In v3.0, I can create a scene without icon and tabContent, it will not show in tabbar, but in v4.0.0, it will show an tab item with empty label and empty icon.

<Scene key="main" initial={true} tabs={true} >
  <Scene key="Home" component={Home} title={'TITLE'} />
  <Scene
    key="HotNews1"
    text="hotNews_title"
    icon={TabIcon}
    component={HotNewsPage}
    tabContent={{
      iconSource: ICON_1,
      selectedIconSource: SL_ICON_1
    }} />
  
  <Scene
    key="HotNews2"
    text="hotNews_title"
    icon={TabIcon}
    component={HotNewsPage}
    tabContent={{
      iconSource: ICON_1,
      selectedIconSource: SL_ICON_1
    }} />
</Scene>

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
EnginYilmazcommented, Jun 2, 2018

import { StatusBar} from 'react-native'; at top of your file and in your render() function <StatusBar hidden={true} /> should work

1reaction
jiecommented, Oct 20, 2018

@RobinJayaswal No, I don’t use react-navigation, here is the code:

                                <Scene
                                    key="main"
                                    initial={true}
                                    tabs={true}
                                    showLabel={false}
                                    tabBarComponent={TabBar}
                                    tabBarStyle={styles.tabBarStyle}
                                    tabBarPosition={"bottom"}
                                >

TabBar is a React.Component

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
How To Hide The Tab Bar When Showing A New View ...
Luckily, there is an easy way to elegantly hide the tab bar using the hidesBottomBarWhenPushed property that every view controller has.
Read more >
How to hide TabBarController programmatically in Swift?
One of another way to hide tab bar without writing a line of code is from storyboard or Xib. open storyboard/Xib and select...
Read more >
Hiding tab bar in specific screens
Hiding tab bar in specific screens ... With this structure, when we navigate to the Profile or Settings screen, the tab bar will...
Read more >
App Shell : Hide TabBar element without disabling it
App Shell : Hide TabBar element without disabling it ; Route · "CharacterSelectionPage" IsVisible · "False" ContentTemplate="{DataTemplate local: ...
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