TLDR Web Dev · QUICK LINKS

STATE IN THE URL IN REACT (THE RIGHT WAY)

medium.com3 min read

Summary from the TLDR Web Dev newsletter

To manage state in the URL in React effectively, avoid directly accessing the global window or using `useState` for URL parameters, and instead, create a custom hook that uses react-router to synchronize the UI with URL search parameters.