Using React Hooks to sync your component state and the URL Query string

Fernando Abolafio
Sep 7, 2019 · 3 min read

Many times we want to control parts of our app by modifying the query string parameters. Learn how you can do it by using React hooks.

To illustrate that we're going to use a simple Tabs component. The idea is:
once the selected tab changes, the query string parameters are updated accordingly. In the same way, if you load your component with…