Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move parameter routes and wildcard routes to the end #64

Merged
merged 1 commit into from
May 7, 2023
Merged

Conversation

KyleJune
Copy link
Member

@KyleJune KyleJune commented May 7, 2023

React Router automatically routes to the most specific route first, so for that it doesn't matter what the order is for the routes. Oak is not the same and the order of the routes matters. Before this fix, if you had both a parameterized route and a regular route, the parameterized route would catch requests to the regular route. This fixes it by moving the parameterized routes and regular routes to the end of the list of children for a router.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant