Skip to content

Commit 0c038db

Browse files
committed
Merge pull request #192 from mamute/update-to-react-router-2.0.0
Update to react-router 2.0.0rc4
2 parents 27e3265 + fc79582 commit 0c038db

File tree

4 files changed

+78
-59
lines changed

4 files changed

+78
-59
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import React from 'react';
22
import { Provider } from 'react-redux';
33
import Router from 'react-router';
4-
import createHistory from 'history/lib/createBrowserHistory';
4+
import { browserHistory } from 'react-router';
55

66
import createStore from '../store/commentsStore';
77
import routes from '../routes/routes';
88

99
export default (props, location) => {
1010
const store = createStore(props);
11-
const history = createHistory();
1211

1312
return (
1413
<Provider store={store}>
15-
<Router history={history} children={routes} />
14+
<Router history={browserHistory} children={routes} />
1615
</Provider>
1716
);
1817
};

client/app/bundles/comments/startup/ServerRouterApp.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Provider } from 'react-redux';
3-
import { match, RoutingContext } from 'react-router';
3+
import { match, RouterContext } from 'react-router';
44

55
import createStore from '../store/commentsStore';
66
import routes from '../routes/routes';
@@ -29,7 +29,7 @@ export default (props, location) => {
2929
// Important that you don't do this if you are redirecting or have an error.
3030
return (
3131
<Provider store={store}>
32-
<RoutingContext {...routeProps} />
32+
<RouterContext {...routeProps} />
3333
</Provider>
3434
);
3535
};

client/npm-shrinkwrap.json

Lines changed: 73 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"react-bootstrap": "^0.28.1",
7171
"react-dom": "^0.14.3",
7272
"react-redux": "^4.0.0",
73-
"react-router": "^1.0.2",
73+
"react-router": "^2.0.0-rc4",
7474
"redux": "^3.0.4",
7575
"redux-promise": "^0.5.0",
7676
"redux-thunk": "^1.0.0",

0 commit comments

Comments
 (0)