TanStackT
TanStack16mo ago
6 replies
sad-indigo

Can I matchRoute on a wildcard path?

I want this kind of logic:
const isAuthRoute = !!matchRoute({ to: "/auth/*" }); // wildcard not allowed
if (!isAuthRoute) {
  // ...
}

Where I can choose to do something when the user is at any path under /auth . I can't use { to: "/auth", fuzzy: true" } because /auth on its own is not a valid selectable route in my app.
Was this page helpful?