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
You can't match a Route on the query string in the path. If this was possible in 6.3 or earlier, that was a bug. The query string is intentionally not supposed to match on a Route, as it is intended for extra data you want sent to that Route.
I've gotten this error when using navigate() to navigate to an URL that includes query parameters. I'm receiving the URL from a third party service (the onRedirectCallback callback from auth0-react to be concrete).
Supplying a URL with a query parameter worked with 6.3, but after upgrading to 6.4.3 I'm receiving the same error as described in this issue.
To get the same behavior as before, instead of simply calling navigate({pathname: returnTo}), I'm currently supplying the URL from the third party service this way:
What version of React Router are you using?
6.4.x
Steps to Reproduce
Cannot include a '?' character in a manually specified.... on Link / NavLink Container
It has been more than 1 month since 6.4 released, and the annoying issue still exists !
Even in 6.4.3 version recently !
Issue
Expected Behavior
<Link to="/somepath/?query=abcd">Target</Link>
<Route path="/somepath?query=:q" element={<Comp />} />
When ever
?
appears into
orpath
=> issue happen.Actual Behavior
Link and NavLink if has
?
character.The text was updated successfully, but these errors were encountered: