'Is it okay, that generic from hook useParams require string?

enter image description here

I want to set an object to destruct, but useParams require string. Before react-router@v6 i use @types/react-router. Using this package it was able to set an object to generic. But now there are own types in package react-router.



Solution 1:[1]

Resolved. It is okay. We just need to use generic like <"id", "name">

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Mormul