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
We've recently grabbed this library to bring some type safety to a next app with many heavily nested routes. The improvement is awesome.
I'm wondering if there's any thought of extending the code generation to include a hook for each route. It is quite noisy to have to build up a path target from scratch every time, unpacking props from useRouter, and attaching them to a long string that has to be just right. Of course it's much better doing this now with some type safety.
I could have worn I saw a question like this on this repo (or maybe elsewhere) a few weeks back, but couldn't find it again.
Cheers!
The text was updated successfully, but these errors were encountered:
Hey @eddiesholl I'm happy to consider a PR or a design for this. I've thought about code generation for runtime utilities like this in the past -- the main pieces would be allowing users to opt-in and determining where to place the generated code.
Could you share an example of the route hook you have in mind?
I think the closest question I've seen to something like this is #39.
We've recently grabbed this library to bring some type safety to a next app with many heavily nested routes. The improvement is awesome.
I'm wondering if there's any thought of extending the code generation to include a hook for each route. It is quite noisy to have to build up a path target from scratch every time, unpacking props from useRouter, and attaching them to a long string that has to be just right. Of course it's much better doing this now with some type safety.
I could have worn I saw a question like this on this repo (or maybe elsewhere) a few weeks back, but couldn't find it again.
Cheers!
The text was updated successfully, but these errors were encountered: