useRouteParams
The useRouteParams
hook retrieves the parameters of an active route. The hook is available in both server and client components.
Example code
Anchor link to section titled "Example code"
Return value
Anchor link to section titled "Return value"The useRouteParams
hook returns an object with key values for each matching route parameter.