pbeshai / use-query-params

React Hook for managing state in URL query parameters with easy serialization.
https://pbeshai.github.io/use-query-params
ISC License
2.13k stars 95 forks source link

fix: consecutive updates accumulate #235

Closed pbeshai closed 1 year ago

pbeshai commented 1 year ago

Fixes #233 by reading the current location from history/navigator when updating values. For React Router 6, this involved using an internal context to access the "navigator" (history) directly, so this may become a bit flaky in the future but seems unlikely.