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)

Jetbrains image

Build Secure, Ship Fast

Discover best practices to secure CI/CD without slowing down your pipeline.

Read more

👋 Kindness is contagious

DEV works best when you're signed in—unlocking a more customized experience with features like dark mode and personalized reading settings!

Okay