You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The params argument is typed according to the route itself. In prior versions of Remix, useParams() would return all params in the current URL, i.e. also those from child routes which may or may not be rendered. The params prop passed to the default route export doesn’t have this in its type signature. I’m not sure about the actual runtime behaviour since I haven’t been able to complete the migration of our app to RRv7.
Expected Behavior
If :someId is present in the params for a given layout route, and :someOtherId is present in the params of a child route, I would expect the type signature of the layout route to be either
What version of React Router are you using?
7
Steps to Reproduce
The
params
argument is typed according to the route itself. In prior versions of Remix,useParams()
would return all params in the current URL, i.e. also those from child routes which may or may not be rendered. Theparams
prop passed to the default route export doesn’t have this in its type signature. I’m not sure about the actual runtime behaviour since I haven’t been able to complete the migration of our app to RRv7.Expected Behavior
If
:someId
is present in the params for a given layout route, and:someOtherId
is present in the params of a child route, I would expect the type signature of the layout route to be eitheror
Actual Behavior
The text was updated successfully, but these errors were encountered: