Vue components require explicit props declaration so Vue knows which values passed in are props and which should be treated as fallthrough attributes. In single-file components using <script setup>, declare props with the defineProps() macro — an array of strings, or the object syntax for validation, where each key is the prop name and the value is the constructor function of the expected type; the same props options API is shared with the props option in non-<script setup> components, where setup() receives props as its first argument. All props form a one-way-down binding: when the parent property updates it flows down to the child, but not the other way around, and every parent update refreshes all of the child's props with the latest value. Never mutate a prop inside a child component — props are readonly and Vue warns in the console. If a prop only supplies an initial value, define a local data property or ref initialized from it; that local state is then disconnected from future prop updates. Scope: Vue 3. Reviewed October 4, 2026.
Components and props: one-way data flow
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- vuejs.org
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.