Replies: 1 comment
-
I think at some point it would be nice to add custom matchers like https://kit.svelte.dev/docs/advanced-routing#matching |
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
-
I'm hoping a reader has recommendation for handling typing route parameters. What's the idiomatic way to handle casts without Vue Router's Function Mode?
For example, consider:
Where
id
is a simple string andaction
is numericAction
enum value./a023sf/0
wouldView
a023sf
.The Vue document resembles this:
The
Props
definition is misleading, all props are strings. But as far as I've encountered there's no error thrown during type checking. No worries here, I think these are understandable behaviors/limitations.My question is, what's typical way to cast these props back to strings?
props: true
withuseRouteParams
usage (+ transform)?props: true
and roll our own transform+cast helper? Perhaps with computed.Thanks a lot for the input. :)
Beta Was this translation helpful? Give feedback.
All reactions