早在对开发人员来说事情变得更简单之前,人们会听取历史对象上的popstate事件;)
看起来所需的信息正在执行中?
history.listen((error, nextRouterState) => { ... store.dispatch(routerDidChange(nextRouterState));和动作:
export function routerDidChange(state) { return { type: ROUTER_DID_CHANGE, payload: state };}因此,请尝试检查
action.payload。
但是,您的switch语句正在使用
action而不是,
action.type所以这里有些混乱。.您也不需要执行
action = {}任何操作-请参阅http://redux.js.org/docs/basics/Reducers.html



