-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
URI with Query Params fails to match #170
Comments
Hi @joe-finreach! Thanks for reporting. Could you share a piece of code that broke in your app? |
Hi @molefrog I'm happy to share some code. Below is a snippet of (something like) the basic routing we had setup. This code works fine in <Switch>
<Route path="/people" component={People} />
<Route path="/courses" component={Courses} />
<Route path="/goals" component={Goals} />
<Route>
<ErrorPage code="404" message="Page Not Found" />
</Route>
</Switch> |
Thanks, I think I've spotted the source of the problem already. It's this line: Line 22 in 71ab672
I guess it should be instead: prevPath.current !== pathname && prevPath.current = pathname && update(currentPathname(base)); Was recently changed in #169 |
We recently upgraded to 2.7.2, and the pagination for our routes broke. When we tested what had changed, we discovered that when we added a query param to any route, the route was not matched. For example, if we had a route
people/admin
that rendered an Admin panel with a list of people, when we navigated to page twopeople/admin?page=2
the default route (404) showed. Downgrading wouter to 2.7.1 solved the problem for us.The text was updated successfully, but these errors were encountered: