-
Notifications
You must be signed in to change notification settings - Fork 0
7. Split
Erik Poort edited this page May 3, 2018
·
2 revisions
This is an odd one, but you can use it if you want. You can basically show two pages in one view.
navigation.start(
<SplitView id="horizontal_split" axis="SplitView.AXIS.HORIZONTAL">
<SingleView id="home" screen={Home} />
<SingleView id="home" screen={Home} />
</SplitView>
);
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.split
Because you can nest navigation types, you can also access the navigator by its id (in the example above 'horizontal_split'):
this.props.horizontal_split
To replace any of the nodes in the split view:
this.props.split.replace("node1", <SingleView id="home" screen={Home} />);
You can replace node1 or node2 with any navigation type.