根据文档,我应该能够LOCATION_CHANGE
通过调用来触发事件push('/with/the/path')
。来自文档的示例:
import { routerMiddleware, push } from 'react-router-redux'
// Apply the middleware to the store
const middleware = routerMiddleware(browserHistory)
const store = createStore(
reducers,
applyMiddleware(middleware)
)
// Dispatch from anywhere like normal.
store.dispatch(push('/foo'))
但是,这看起来像当我调用 push 时我得到了这个(看起来它没有做任何事情):
我错过了什么?