Can 'defineProps' be used independently for each prop? #10757
-
One of the major change in vue2 to vue3 migration was to separate the data() properties, Is it not possible to write props and emits separately? let ref_msg = ref<string>('Hello World!');
let msg = prop<string>({default: 'Prop Msg', type: String}); |
Beta Was this translation helpful? Give feedback.
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.
-
Beta Was this translation helpful? Give feedback.
vuejs/rfcs#513