Open utterances-bot opened 1 year ago
One more solution. Continue use vue option api
One more solution. Continue use vue option api
Could be a good option, if that's your preference. 😄
By the way you can enable Reactivity Transform to preserve reactivity when props are destructured. Even with Reactivity Transform being dropped, Reactive Props Destructure part will most likely be kept.
By the way you can enable Reactivity Transform to preserve reactivity when props are destructured
That's a good idea, thanks for suggesting it @Demivan.
But please note that the Reactivity Transform is now deprecated.
@panzerdp Yes, but here https://youtu.be/OrT0tHGXyqE?t=1094 Evan says that Reactive Props Destructure will be split from Reactivity Transform and will likely land.
It just provides so much nicer syntax for Typescript users.
@Demivan That's wonderful news! It's a needed feature.
Here it is! The Vue 3.3 release brings us another way of destructuring props while keeping them reactive. It also gives a nifty syntax for assigning default values
How to Destructure Props in Vue (Composition API)
How to correctly destructure props object in a Vue component while maintaining the reactivity.
https://dmitripavlutin.com/props-destructure-vue-composition/