Typed routing from existing routes #127
Closed
Rolanddoda
started this conversation in
Ideas
Replies: 1 comment 5 replies
-
This would work in some scenarios but it would have a bad performance (infer params from paths literals) and would be way too verbose. The whole idea is to make things automatic so we don't make errors (like typos). I think that if you give file based routing a try you won't be disappointed 😄 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
File-based-routing looks cool but it would be nice if we can get typed routing without the need to use file-based-routing. This plugin automatically creates the
routes
but instead of just creating them like this:It also creates the typing:
Is it possible to export a function like this:
And probably a function like:
So we can easily replace the current implementation of routes like:
Could something like this work and generate the same typing? 🤔
Beta Was this translation helpful? Give feedback.
All reactions