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

Changed inports to react-router-dom instead of react-router #241

Closed lisandro52 closed 1 year ago

lisandro52 commented 1 year ago

I had an error with the ReactRouter6Adapter that kept telling me that the useNavigate() should be used inside a <Router> context. I copied the Adapter to my project, changed the import from react-router to react-router-dom, and it started working again. Leaving the PR in case it solves the same problem to someone else (and because we shouldn't be importing from react-router directly anyway).

pbeshai commented 1 year ago

Ah great, thank you! This is in v2.1.1