Answers for "window.location.search get parameters react"

0

window.location.search get parameters react

import { useLocation } from 'react-router';
import queryString from 'query-string';

const Dashboard: React.FC = React.memo((props) => {
    const location = useLocation();

    console.log(queryString.parse(location.search));

    // {__firebase_request_key: "blablabla", _k: "v9ifuf"}

    ...

    return <p>Example</p>;
}
Posted by: Guest on August-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language