You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to using pushState to redirect user after he does something. function someAction () { return dispatch => { dispatch(someOtherAction); //this modifies the state. dispatch(pushState('newroute'); } }
but the dispatch pushState doesn't seems to work. However, in ComponentWillReceiveProps (I do a pushState, it works.)
Any thoughts on why this is the case?
The text was updated successfully, but these errors were encountered:
@xinghengwang what does your create store look like? One thing I could think of is that because you are using redux-thunk the order of the store enhancer with the middleware could cause the action not to get picked up. I'd be interested to know if you see the dispatched action in redux-logger when you use the action creator
I am using this template: https://github.com/erikras/react-redux-universal-hot-example
I forked it a while ago (when it was still on redux router, even though latest version has updated to redux-react-router), but createStore is pretty much the same:
I want to using pushState to redirect user after he does something.
function someAction () { return dispatch => { dispatch(someOtherAction); //this modifies the state. dispatch(pushState('newroute'); } }
but the dispatch pushState doesn't seems to work. However, in ComponentWillReceiveProps (I do a pushState, it works.)
Any thoughts on why this is the case?
The text was updated successfully, but these errors were encountered: