Closed cleisonmp closed 1 month ago
Hey @cleisonmp is this a duplicate of https://github.com/tatethurston/nextjs-routes/issues/39?
The issue with adding a second type argument like this is that it doesn't provide any type safety, it just hides the cast. This would be the same as doing:
const query = useRouter().query as UrlStates
Hey @cleisonmp is this a duplicate of #39?
It's I missed that due to the title, sorry.
That routers:{}
solution you proposed would be awesome.
Would it be possible to add typed search params ex page, search, or other states we want to lift to the url?
Maybe even if it's just a generic to useRouter ex:
useRouter<'/accounts',UrlStates>()