typesafe pathname?
Hi why useLocation().pathname is a string? Why can't codegen get the type properly? What other function gives me typed all possible pathnames?
2 Replies
constant-blue•2mo ago
how would that work with path params?
useMatches is typesafe
absent-sapphireOP•2mo ago
I don't care about path params
I want to know if i am on "/" or "/about" or "/$slug"
or even skip $slug here 😄
okey i guess matches solves my problem ty