Skip to content

Instantly share code, notes, and snippets.

@zacck-zz
Created January 12, 2017 15:40
Show Gist options
  • Save zacck-zz/f7771792a5acf94da51f2a6ac58b745d to your computer and use it in GitHub Desktop.
Save zacck-zz/f7771792a5acf94da51f2a6ac58b745d to your computer and use it in GitHub Desktop.
{/*Main component will always be rendered*/}
<Route path="/" component={HapiHour}>
<IndexRoute
getComponent={(location, cb) =>{
System.import('LandingMap')
.then(loadRoute(cb))
.catch(errorLoading);
}}
/>
{/*Add Routes here */}
<Route
path='/settings'
getComponent={(location, cb) =>{
System.import('SettingsPane')
.then(loadRoute(cb))
.catch(errorLoading);
}}
/>
<Route
path='/reviews'
getComponent={(location, cb) =>{
System.import('ReviewsActivity')
.then(loadRoute(cb))
.catch(errorLoading);
}}
/>
<Route
path='/spots'
getComponent={(location, cb) => {
System.import('SpotActivity')
.then(loadRoute(cb))
.catch(errorLoading);
}}
/>
<Route
path='/addspot'
getComponent={(location, cb) =>{
System.import('AddSpotPage')
.then(loadRoute(cb))
.catch(errorLoading);
}}
/>
</Route>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment