Can 'defineProps' be used independently for each prop? #10757
Unanswered
yogeshgalav
asked this question in
Help/Questions
Replies: 2 comments 4 replies
-
I'm wondering why you believe using props across the entire script would be a cleaner approach instead of defining them in one place? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One of the major change in vue2 to vue3 migration was to separate the data() properties,
So that they can be better typed and reusability using ref() or reactive().
But I don't know why this is not the case with props and emits.
They are still written at one place, cluttering the code.
And for better typescript support they made code somewhat more complex.
Is it not possible to write props and emits separately?
Beta Was this translation helpful? Give feedback.
All reactions