question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useMatch does not match against query params

See original GitHub issue

When using a Link that does routing with a query params such as routes.home({filter: "DASHBOARD"}), this matches for all home routes and does not distinguish between query params

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
LBriancommented, Jun 1, 2021

PR #2683

1reaction
LBriancommented, May 29, 2021

Might be the same as #2362

This is the same issue @dthyresson mentioned in #2362 regarding queryString matching and the root cause is matchPath doesn’t take location.search into account, we should be able to tackle this in #2362 as a whole.

Read more comments on GitHub >

github_iconTop Results From Across the Web

why is useMatch not working in React router? - Stack Overflow
In react-router-dom v6 the useMatch hook takes a required pattern value that is either a string representing a path or a PathPattern object....
Read more >
useMatch - Reach Router
useMatch. Matches a path to the location. Matching is relative to any parent Routers, but not parent match's, because they render even if...
Read more >
useMatches v6.6.1 - React Router
useMatches only works with a data router like createBrowserRouter , since they know the full route tree up front and can provide all...
Read more >
MATCH Function - Formula, Examples, How to Use Match in ...
The MATCH function is categorized under Excel Lookup and Reference functions. It looks up a value in an array and returns the position...
Read more >
JavaScript String match() Method - W3Schools
The match() method returns an array with the matches. The match() method returns null if no match is found. Note. ** If the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found