import React from "react";import { BrowserRouter as Router, Link, useLocation from "react-router-dom";export default function QueryParamsExample() { return ();}// A custom hook that builds on useLocation to parse the query string for you.function useQuery() { return new URLSearchParams(useLocation().search);}function QueryParamsDemo() { let query = useQuery(); return (

Accounts

);}function Child({ name }) { return (
{name ? (

The name in the query string is "{name}"

) : (

There is no name in the query string

)}
);}