Skip to content

Instantly share code, notes, and snippets.

@david90
Created June 30, 2017 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david90/75ebf877aa7261cecf97cbfcc8a860d3 to your computer and use it in GitHub Desktop.
Save david90/75ebf877aa7261cecf97cbfcc8a860d3 to your computer and use it in GitHub Desktop.
Sample Route
const sampleRoute = {
renderNavBarLeft: () => (<NavBarBackButton />),
renderNavBarTitle: () => (<SimplePageTitle />),
renderNavBarRight: () => null,
renderScene: () => (<SamplePage />),
};
// navigator
<Navigator
{ ...otherPropsPassingToNavigator }
renderScene={route => route.renderScene()}
navigationBar={
<Navigator.NavigationBar
routeMapper={{
LeftButton: route => route.renderNavBarLeft(),
RightButton: route => route.renderNavBarTitle(),
Title: route => route.renderNavBarTitle(),
}}
/>
}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment