How do I set a route as an Index if it requires a parameter 🙏🏽 #9105
Unanswered
deyemiobaa
asked this question in
Q&A
Replies: 1 comment
-
That's the issue with index routes, they are kinda useless in v6. <Route index element={<Navigate to="123" replace={true} />} /> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was following the quick start guide on react-router, and I came across this code sample that shows how to direct a route to a nested route by default using index.
Now my question is if the path you're trying to switch to requires a parameter :someID how would I set it as the index with a default value? e.g /23
Beta Was this translation helpful? Give feedback.
All reactions