Replies: 2 comments
-
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.
-
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