Skip to content

Commit

Permalink
Fix "You cannot change <Router routes>; it will be ignored" error mes…
Browse files Browse the repository at this point in the history
…sage by implementing solution in Github: remix-run/react-router#2704 (comment)

Router is only instantiated once in a production setting (e.g. not webpack-dev-server), so there is minimal overhead on producing a random key value for `Router`.
  • Loading branch information
dternyak committed Sep 8, 2017
1 parent 9bd93f1 commit 37f6d77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/components/Root/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class Root extends Component {
const { store, history } = this.props;
return (
<Provider store={store}>
<Router history={history}>
<Router history={history} key={Math.random()}>
<Route name="App" path="" component={App}>
<Route name="GenerateWallet" path="/" component={GenerateWallet} />
<Route
Expand Down

0 comments on commit 37f6d77

Please sign in to comment.