-
Notifications
You must be signed in to change notification settings - Fork 142
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
Custom payload data disappears when using the browsers back-button #373
Comments
Rudy handles this use case in a more consistent way:
|
The problem is that if i manually push the state using window.history.pushState or through Rudy push-method there will be 2 entries in the browsers history-object with the same url. Or am i misunderstanding something? |
Basically you should never use the history API directly - the intention is that RFR/Rudy wraps it. You can use a redirect/replace action in both RFR and Rudy to push a route that replaces the previous route instead of pushing a new one. This is analogous to history.replaceState. |
I got it to work when using the replace-method. |
import { redirect } from 'redux-first-router';
<NavLink to={redirect({ type: 'HOME'})} /> |
I have an application where i add custom data to the payload-object for certain routes.
It works excellent, however when i use the back-button i Chrome the data disappears. Before i klick on the back-button the data is there when i inspect in redux dev tools.
What is the reason for this?
The text was updated successfully, but these errors were encountered: