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
Hey! Confused about matching behaviour seemingly new to v6 (after migrating our application from v5).
Say I'm on some path, /path/to/something/ and I need to match it with useMatch.
useMatch('/path/to/:slug') matches
useMatch('/path/to/:slug?') does not match
Is this intentional? What is the reasoning behind this? This makes it harder to reuse paths -- ideally I would like to have a path pattern in a variable and reuse it across the application for routes, links, matches, etc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! Confused about matching behaviour seemingly new to v6 (after migrating our application from v5).
Say I'm on some path,
/path/to/something/
and I need to match it withuseMatch
.useMatch('/path/to/:slug')
matchesuseMatch('/path/to/:slug?')
does not matchIs this intentional? What is the reasoning behind this? This makes it harder to reuse paths -- ideally I would like to have a path pattern in a variable and reuse it across the application for routes, links, matches, etc.
Beta Was this translation helpful? Give feedback.
All reactions