Skip to content

Commit

Permalink
Update ReactRouter
Browse files Browse the repository at this point in the history
* Update to new Signature using RouterContext
* Update to new history signature using browserHistory
  • Loading branch information
lifeiscontent committed Feb 18, 2016
1 parent 5e1b241 commit a7ff7c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/additional_reading/react_router.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const RouterApp = (props, location) => {
// Important that you don't do this if you are redirecting or have an error.
return (
<Provider store={store}>
<RoutingContext {...routeProps} />
<RouterContext {...routeProps} />
</Provider>
);
};
Expand Down
13 changes: 4 additions & 9 deletions spec/dummy/client/app/startup/ClientRouterApp.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import React from 'react';
import Router from 'react-router';
import createHistory from 'history/lib/createBrowserHistory';
import Router, { browserHistory } from 'react-router';
import routes from '../routes/routes';

export default (props) => {
const history = createHistory();

return (
<Router history={history} children={routes} {...props} />
);
};
export default (props) => (
<Router history={browserHistory} children={routes} {...props} />
);
4 changes: 2 additions & 2 deletions spec/dummy/client/app/startup/ServerRouterApp.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { match, RoutingContext } from 'react-router';
import { match, RouterContext } from 'react-router';

import routes from '../routes/routes';

Expand All @@ -24,6 +24,6 @@ export default (props, location) => {

// Important that you don't do this if you are redirecting or have an error.
return (
<RoutingContext {...routeProps} />
<RouterContext {...routeProps} />
);
};

0 comments on commit a7ff7c2

Please sign in to comment.