Replies: 2 comments
-
|
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
-
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
Uh oh!
There was an error while loading. Please reload this page.
-
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
idis a simple string andactionis numericActionenum value./a023sf/0wouldViewa023sf.The Vue document resembles this:
The
Propsdefinition 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: truewithuseRouteParamsusage (+ transform)?props: trueand roll our own transform+cast helper? Perhaps with computed.Thanks a lot for the input. :)
Beta Was this translation helpful? Give feedback.
All reactions