-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
// Main.js
import App from './containers/App.js';
...
const Routes = () => (
<Router hideNavBar={true} name="root">
<Schema name="default" sceneConfig={Navigator.SceneConfigs.FloatFromRight} />
<Schema name="modal" sceneConfig={Navigator.SceneConfigs.FloatFromBottom} />
<Schema name="tab" type="switch" icon={TabIcon} />
<Route name="app" component={App} type="replace" />
</Router>
);// App.js
render(){
return (
<Router footer={TabBar} showNavigationBar={true}>
<Route name="tab1" type="switch" icon={TabIcon} title="Tab #1">
<Router onPop={ ()=>{console.log("onPop is called!"); return true} }>
<Route name="tab1_1" component={Dashboard} title="Tab #1_1" />
<Route name="tab1_2" component={Dashboard} title="Tab #1_2" />
</Router>
</Route>
<Route name="tab2" type="switch" icon={TabIcon} title="Tab #2" hideNavBar={true}>
<Router onPop={ ()=>{console.log("onPop is called!"); return true} }>
<Route name="tab2_1" component={Dashboard} title="Tab #2_1" />
<Route name="tab2_2" component={Dashboard} title="Tab #2_2" />
</Router>
</Route>
<Route name="tab3" component={Dashboard} type="switch" icon={TabIcon} title="Tab #3" />
<Route name="tab4" component={Dashboard} type="switch" icon={TabIcon} title="Tab #4" />
<Route name="tab5" component={Dashboard} type="switch" icon={TabIcon} title="Tab #5" />
</Router>
)
}When I go to any route inside App I'll get something like that:
Metadata
Metadata
Assignees
Labels
No labels
