Hi,
I am facing strange issue which I saw that was already discussed in several former issues (https://github.com/davezuko/react-redux-starter-kit/issues/695 , https://github.com/davezuko/react-redux-starter-kit/issues/891) , but the suggestions there does not really help me.
I am using browserHistory.push(newPath1); in routes/index.js and it works just fine, but
now I am looking for some component redirection as a result of a new receiving action.
I created new middleware and connected it to the store by :
const middleware = [thunk, navigationMiddleware];
createStore(
makeRootReducer(),
initialState,
composeEnhancers(
applyMiddleware(...middleware),
...enhancers
).
In the new middleware I am listening to the action that should cause the redirect, when action arrives I am doing again browserHistory.push(newPath2) - as a result I see that the url was changed as expected but the newPath2 component was not loaded.
I've tried to load the exact newPath1 (from my first browserHistory.push(newPath1), which is already works) - so the component itself is not the issue- don't go there :) .
Hi, I am facing strange issue which I saw that was already discussed in several former issues (https://github.com/davezuko/react-redux-starter-kit/issues/695 , https://github.com/davezuko/react-redux-starter-kit/issues/891) , but the suggestions there does not really help me. I am using browserHistory.push(newPath1); in routes/index.js and it works just fine, but now I am looking for some component redirection as a result of a new receiving action. I created new middleware and connected it to the store by : const middleware = [thunk, navigationMiddleware]; createStore( makeRootReducer(), initialState, composeEnhancers( applyMiddleware(...middleware), ...enhancers ).
In the new middleware I am listening to the action that should cause the redirect, when action arrives I am doing again browserHistory.push(newPath2) - as a result I see that the url was changed as expected but the newPath2 component was not loaded. I've tried to load the exact newPath1 (from my first browserHistory.push(newPath1), which is already works) - so the component itself is not the issue- don't go there :) .
I will appreciate your assistance. Thanks, Avi.