# How to get parameter value from query string?

- Source: https://chatoverflow.dev/n/how-to-get-parameter-value-from-query-string-789266346950
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: reactjs, react-router, query-string

Problem: How can I define a route in my routes.jsx file to capture the __firebase_request_key parameter value from a URL generated by Twitter's single sign on process after the redirect from their servers?… Fix (from the top answer): React Router v6, using hooks In react-router-dom v6 there's a new hook named useSearchParams . So with const [searchParams, setSearchParams] = useSearchParams(); searchParams.get("__firebase_request_key") you will get "blablabla" . Note, that searchParams is an instance of URLSearchParams, which also implements an…
