useQuery() with React Router Dom
Breno Novelli
Posted on November 6, 2020
import { useLocation } from 'react-router-dom';
const useQuery = () => new URLSearchParams(useLocation().search);
let query = useQuery();
console.log(query.get('myquery');
💖 💪 🙅 🚩
Breno Novelli
Posted on November 6, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.