Router determine if 404 route
Is it possible with the router to determine if the current route is the "404" route aka matches
"*"
?
Was trying to think of a way with useMatch
but not sure how to set the matchFilters or even the path for that.
My usecase is, that i have analytics tracking which tracks the pageViews but for the 404 page i need different handling hence i have to somehow figure out that i'm on that route from outside that route.
thx3 Replies
In which context are you using the router? Solid start or classic?
In the old beta solid start, do the router is 0.9
The route is just defined as the last one and as
`<Route match={"*"} component={NotFound} />‘
which I believe was part of default example back then
I believe you're supposed to add a name after the star for a catch-all route, e.g. "*404".