react-router history无法读取未定义的属性位置

时间:2017-03-04 13:48:52

标签: react-router

我正在使用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

我该如何解决这个问题?

0 个答案:

没有答案