Declaring Props with defineProps
defineProps is a compiler macro that declares the component's input contract, either via a runtime object or a pure TypeScript type argument from which the compiler generates runtime checks; props are one-way, read-only reactive inputs, and since Vue 3.5 destructured props retain reactivity via compiler transformation.
This Concept is waiting for its first lesson!
defineProps is a compiler macro that declares the component's input contract, either via a runtime object or a pure TypeScript type argument from which the compiler generates runtime checks; props are one-way, read-only reactive inputs, and since Vue 3.5 destructured props retain reactivity via compiler transformation.
Are you a teacher? Sign in to start contributing.
Sign In