[SUGGESTION] Moving towards a strongly typed Vue Router ... #286
michealroberts
started this conversation in
Ideas
Replies: 1 comment
-
We already did type generation without a build step in the past, but it becomes too slow with many routes
I still need to check tanstack/router source code to get a better understanding of what they do to generate the glue code and the differences with UVR. It seems like you still write some of your routes manually but there might be other lessons to learn! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, this plugin is great. I in no way mean to dismiss how useful it is for the community. I think there is a place for it on the template level, in combination perhaps with Volar or vue-language tools. I will be continuing to use this for a very long time to come.
However, it feels like a strongly typed router is the way forward, in perhaps, version 5 (or, if compatibility can be ensured, version 43.) this would be better suited by infering
router.push()
navigable routes, perhaps taking inspiration from ts-routes or @tanstack/router.I would be more than happy to work on this ...
A bridge might be able to mention usage of ts-routes with Vue Router, or similar, perhaps in a miscellaneous section of the documentation?
Beta Was this translation helpful? Give feedback.
All reactions