useParams
Returns an object of key/value pairs of the dynamic params from the current URL that were matched by the route path.
function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[ParamsOrKey] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;