To get the $_GET params from the URL in a React Application use the following code:

Import the useParams Hook:

import { useParams } from 'react-router';

TYPESCRIPT: Declare variable form the param value:

 const { name } = useParams<{ name: string; }>();

Another way. See explanation

const { name } = useParams() as any;

NOTE: Cannot be a type of number

To change it to a integer, you may use this code instead:

  let { qtimer } = useParams() as any;
  qtimer = parseInt(qtimer);

Another Option:

  let { qlength } = useParams<{ qlength: string; }>();
  let { qtimer } = useParams<{ qtimer: string; }>();
  const qtimerInt = parseInt(qtimer);
  const qlengthInt = parseInt(qlength);

 

Javascript:

  let { name } = useParams();

Use it

 <ExploreContainer name={name} />