Skip to content

Instantly share code, notes, and snippets.

@4knort
Created November 23, 2016 21:10
Show Gist options
  • Save 4knort/30acd4b6f42e5395c49e36a358a9f0f5 to your computer and use it in GitHub Desktop.
Save 4knort/30acd4b6f42e5395c49e36a358a9f0f5 to your computer and use it in GitHub Desktop.
import React, { PropTypes } from 'react';
import { Route, IndexRoute } from 'react-router';
import { HotRouter } from 'utils';
import { IndexPage, UserPage } from 'pages';
import AppContainer from 'components/AppContainer';
const AppRouter = ({ history }) => (
<HotRouter history={history}>
<Route path="/" component={AppContainer}>
<IndexRoute component={IndexPage} />
<Route path="user/:id" component={UserPage} />
</Route>
</HotRouter>
);
AppRouter.propTypes = { history: PropTypes.object.isRequired };
export default AppRouter;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment