-
Notifications
You must be signed in to change notification settings - Fork 18
Updating the URL directly in the browser doesn't affect React Router #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@kartiklad Good catch and good guess. You're right, if you disable I think the solution would be to add a config to avoid syncing the router's state in local storage, which really shouldn't be done anyway. There is more information on the redux-localstorage repository. If you have time, maybe you could submit a PR for it? |
To avoid confusion in the future, we could also disable |
@calvinl Thanks for the quick revert mate! I did try disabling the localStorage yesterday and it worked as expected, was just wondering if there was a better way. Anyways, I think I will try and put in a config to avoid router state to be put in local storage. I'll send a PR if I'm successful. But in the meanwhile may be it's worth getting rid of localStorage for this boilerplate, just to avoid future users from questioning their sanity 😉 Will send a PR to remove the local storage. Cheers! |
I have a very weird issue. I'm not sure if this is expected behaviour or a bug.
Assume that we are on route /example/2 and I change the url of the browser to point to /example. The page reloads but the route loaded is still /example/2
My guess is the redux state store in the Local storage forces the previous route to be reloaded since the route change wasn't triggered from the page itself but the browser url. But I thought this would be handled by the universal routing.
What am I missing here? is there any way I can solve this problem?
The text was updated successfully, but these errors were encountered: