我正在使用react-router: "^3.0.2",
和history": "^3.0.0
,我设置了redux
商店,如:
import { createHistory } from 'history';
export default function configureStore() {
let createStoreWithMiddleware = composeEnhancers(
applyMiddleware(thunk),
reduxReactRouter({ routes, createHistory })
)(createStore)
const store = createStoreWithMiddleware(rootReducer)
return store
}
它给我的错误如cannot read property location of undefined
。
我该如何解决这个问题?