Last active
December 25, 2016 00:09
-
-
Save kimmobrunfeldt/4bf6080f58e3457ee618ae6f549d3e1d to your computer and use it in GitHub Desktop.
Example of how react-router configuration could look like as a JS object
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
const routes = [ | |
{ path: '/', component: App }, | |
{ path: '/users/', component: UserList }, | |
{ path: '/users/:userId', component: User }, | |
{ path: '*', component: Default }, | |
]; | |
<Router history={browserHistory} routes={routes} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment