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.16k stars 96 forks source link

Why can't this work without Provider component? #173

Closed ilya-neattech closed 2 years ago

pbeshai commented 2 years ago

We need some way to access the history and location of your current router, the Provider component sets it up so we can do so. If you were building only for one specific router (e.g. React Router) you could just use their hooks directly within a useQueryParam hook, but this lib is not setup that way.