Created
July 6, 2018 08:32
-
-
Save MicroBenz/0730bc08f6c603c1cd1066493b483f1e to your computer and use it in GitHub Desktop.
React Code Splitting
This file contains hidden or 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 { Switch, Route } from 'react-router-dom'; | |
import Login from './pages/Login'; | |
import Dashboard from './pages/Dashboard'; | |
import User from './pages/User'; | |
const Routes = () => { | |
return ( | |
<Switch> | |
<Route path="/login" exact component={Login} /> | |
<Route path="/dashboard" exact component={Dashboard} /> | |
<Route path="/users" exact component={User} /> | |
</Switch> | |
); | |
}; | |
export default Routes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment