-
Notifications
You must be signed in to change notification settings - Fork 0
5. Tabs
Erik Poort edited this page May 3, 2018
·
3 revisions
This is how you run the app with tab bar navigation:
navigation.start(
<TabView id="tabbar">
<SingleView id="home" screen={Home} />
<SingleView id="home" screen={Home} />
<SingleView id="home" screen={Home} />
</StackView>
);
Calls are navigator type specific, so you should access them that way as well.
It doesn't make sense to call 'push' on a tabbar, so these calls are split up.
You can access the navigation via the props:
this.props.tabs
Because you can nest navigation types, you can also access the navigator by its id (in the example above 'tabbar'):
this.props.tabbar
To programmatically switch to another tab:
this.props.tabs.openTab(1);