Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into @tanstack router or vue-router typed routes #666

Open
vincerubinetti opened this issue Mar 29, 2024 · 0 comments
Open

Look into @tanstack router or vue-router typed routes #666

vincerubinetti opened this issue Mar 29, 2024 · 0 comments
Labels
enhancement New feature or request frontend

Comments

@vincerubinetti
Copy link
Contributor

Frontend routers are just now starting to become typesafe. That is, instead of just being able to <router-link> or router.push to just /any-old-string-path, they'll actually be aware of what routes you've defined and what URL params or hash values need to or could be there, and warn you if you try to do something different.

Not certain, but it seems like the tanstack router came up with the idea to do this first. Or at least they lit a fire under everyone, because React and Vue routers are looking into doing this now too. But I think tanstack might be more fully featured, and seems to be ready now.

https://tanstack.com/router/latest
https://router.vuejs.org/guide/advanced/typed-routes

You may notice... "first class search params". That is, it may obviate the need for our custom useParam composable. It seems like it has a ton of other useful features too.

Everything is working fine as it is right now, so this isn't 100% necessary. But it would be a nice long term improvement. I plan to start any new projects using tanstack router or equivalent (if React/Vue routers build things in as nicely as this one does).

@vincerubinetti vincerubinetti added enhancement New feature or request frontend labels Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

No branches or pull requests

1 participant