DEV Community

Cover image for Get the search params with React Router
coder4life
coder4life

Posted on

Get the search params with React Router

Get the query string params (aka search params) with React Router using the useSearchParams hook from React Router v6. A search param is what comes as key/value pair after a ? separator in the URL. For example "?name=john" where name is the key and john is the value.

Top comments (0)