Skip to content

Instantly share code, notes, and snippets.

@zrod
Last active February 1, 2018 02:10
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 zrod/45f182cd9de57f3a4bb7cd9e376ed5ca to your computer and use it in GitHub Desktop.
Save zrod/45f182cd9de57f3a4bb7cd9e376ed5ca to your computer and use it in GitHub Desktop.
// ...
export class App extends React.Component
{
static propTypes = {
auth: PropTypes.object.isRequired
};
render() {
// ...
return (
<div id="app">
<Header />
<Route exact path="/" component={MainPage} />
<Route path="/stores" component={StoresPage} />
<Route path="/products" component={ProductsPage} />
<Route path="/products/:slug" component={ProductDetailPage} />
<Footer />
</div>
);
}
}
//...
render(
<Provider store={store}>
<BrowserRouter>
<Switch>
<App />
<Route component={NotFound} />
</Switch>
</BrowserRouter>
</Provider>,
document.getElementById('app')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment