Skip to content

Commit

Permalink
Import and consume browserHistory from react-router
Browse files Browse the repository at this point in the history
Attempting to use history without importing and consuming
browserHistory on the Router component results in an undefined
runtime error.
  • Loading branch information
Anthony Garritano committed Dec 1, 2016
1 parent a0da5a1 commit 76d4fc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generators/app/templates/client/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import React from "react";
import {render} from "react-dom";
import {routes} from "./routes";
import {Router} from "react-router";
import {Router, browserHistory} from "react-router";
import {createStore} from "redux";
import {Provider} from "react-redux";
import "./styles/base.css";
Expand All @@ -22,7 +22,7 @@ window.webappStart = () => {
const store = createStore(rootReducer, initialState);
render(
<Provider store={store}>
<Router>{routes}</Router>
<Router history={browserHistory}>{routes}</Router>
</Provider>,
document.querySelector(".js-content")
);
Expand Down

0 comments on commit 76d4fc2

Please sign in to comment.