Skip to content

Generate hook to wrap each route #173

@eddiesholl

Description

@eddiesholl

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions