Skip to content

Instantly share code, notes, and snippets.

@kimmobrunfeldt
Last active December 25, 2016 00:09
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 kimmobrunfeldt/4bf6080f58e3457ee618ae6f549d3e1d to your computer and use it in GitHub Desktop.
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
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