Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

browserHistory.push change url path but not really loads the component. #1326

Open
aviklar10 opened this issue Aug 30, 2017 · 0 comments
Open

Comments

@aviklar10
Copy link

aviklar10 commented Aug 30, 2017

Hi,
I am facing strange issue which I saw that was already discussed in several former issues (#695 , #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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant