Closed donegjookim closed 2 years ago
How are they coming back to the page? If using the back button, the push
and pushIn
(default) update types in setQuery will do that. If they're using a link, you just need to manage that state and include it in your link.
The users would may back to the page using links and back button. It'd be nice for the library to support this functionality out of the box as keeping track of all the links would go out of control.
It won't be added to this library. You can store the state for links by making your own custom link component that manages it, it's not too bad and you can control how it caches to work how you expect.
Our application has a use case to preserve query params for next time the user comes back to a page via React Router.
For example,
Expected behavior /pageA?param=7 -> /page/B -> /pageA?param=7
Current behavior /pageA?param=7 -> /page/B -> /pageA
Is there a way to persist the query param state globally?