How to get search query params with React Router v6

Опубликовано: 14 Октябрь 2024
на канале: coder4life
18,080
215

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.

► Social Media
  / coder4_life  
https://github.com/another-coder4life
  / coder4.life.code