Replies: 3 comments 2 replies
-
We were hoping for exactly this too. I have a scenario where a page has a loader request to load information about how the page should initially be rendered, but when a user clicks certain buttons on the page that navigate, we know we want to clear that state, so we do not need to load it. It seemed like passing history state to Our workaround for now was to set and check global state on |
Beta Was this translation helpful? Give feedback.
-
Linking #11274 . A general ability to read/write history.state has tons of uses! |
Beta Was this translation helpful? Give feedback.
-
I'm on Remix v2, was really hoping RR7 would finally add this feature. I guess we'll wait for Remix 3? Edit: Adding a genuine use case of a weather app
If the Link can pass the location object as a state to loader, the app can completely skip a second call to geocoding api. Of course, I can already include the geocoding result as Link params but that's not what I'm looking for. I would like my Links to human readable and shareable format. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When navigating to a page, one can currently add "state" to the navigation that then becomes available in useLocation().state
I would like to suggest an improvement to this by making it available in the loader function.
Browsed the underlying code a bit, and some of my thoughts following:
Sorry for the messy explanation, feel free to restructure it and ask if anything is unclear.
Beta Was this translation helpful? Give feedback.
All reactions