DEV Community

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

Posted on

2

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)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series