Skip to content

Commit

Permalink
added root route
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jan 24, 2016
1 parent 36a173d commit ed26b4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blog/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, browserHistory } from 'react-router';
import reducers from './reducers';
import routes from './routes';

const createStoreWithMiddleware = applyMiddleware()(createStore);

ReactDOM.render(
<Provider store={createStoreWithMiddleware(reducers)}>
<Router history={browserHistory} />
<Router history={browserHistory} routes={routes} />
</Provider>
, document.querySelector('.container'));
8 changes: 8 additions & 0 deletions blog/src/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import { Route, IndexRoute } from 'react-router';

import App from './components/app';

export default (
<Route path="/" component={App} />
);

0 comments on commit ed26b4d

Please sign in to comment.