Props 15 / 42
To pass down data to components we use props.
Props (like buttonLabel
here) are very similar to HTML attributes.
Inside VCounter.vue
we define all the props that we accept. We access props like state or computed fields.
Try changing the props declaration to props: ['buttonLabel']
. It's shorter, but you must handle the default value yourself ({{ buttonLabel || 'increment' }}
).