With react router v5, to specify the result type of useParams, I used:
const { param1, param2 } = useParams<{ param1: string, param2: string }>();
How can I do that with react router v6?
I cannot figure out how to type more than 1 parameter (e.g.: useParams<"param1">()) and I cannot figure out how to type the param as string and not string | undefined (see question).