Created
December 22, 2017 22:24
-
-
Save zackbiernat/7a18e4668b053a5c8310ef7a9e93f86f to your computer and use it in GitHub Desktop.
React-router boilerplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Route, Router } from 'react-router-dom'; | |
import App from 'App.js'; | |
import Dashboard from 'Dashboard.js'; | |
export const makeMainRoutes = () => { | |
return ( | |
<Router component={App}> | |
<div> | |
<Route exact path="/" render={(props) => <App {...props} />} /> | |
<Route path="/home" render={(props) => <Dashboard {...props} />} /> | |
</div> | |
</Router> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment