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
<TypedLink> allowing us to write typesafe links by default
useTypedRoute when called without props it's the same as useRouter but enforces the use of typesafe routes in push/replace, but if called with a prop also types router.query (example below)
Possible implementation(s)
Super simple example of just key + args way of doing it, we could also make it so it's either Routers.Page or This way
This can be done in userland, but if we make it so it has to be done in userland a lot of people will ignore it, this will make it easier to "enforce better practices on people"
The text was updated successfully, but these errors were encountered:
What do you want and why?
From
@blitzjs/next
export 2 new utils<TypedLink>
allowing us to write typesafe links by defaultuseTypedRoute
when called without props it's the same as useRouter but enforces the use of typesafe routes in push/replace, but if called with a prop also types router.query (example below)Possible implementation(s)
Super simple example of just key + args way of doing it, we could also make it so it's either Routers.Page or This way
Additional context
This can be done in userland, but if we make it so it has to be done in userland a lot of people will ignore it, this will make it easier to "enforce better practices on people"
The text was updated successfully, but these errors were encountered: