Start your All-Access Pass to unlock this challenge
Suppose we have a component named TitleComponent
that is ready to be
used. This component accepts a title
prop and we want to populate it with
the value of an imaginary data key called categoryName
. Our main component
looks like this:
<template>
<title-component />
</template>
<script>
import TitleComponent from '@/components/title-component';
export default {
name: 'MainComponent',
components: {
TitleComponent
},
data() {
return {
categoryName: 'Broken Cups',
}
},
};
</script>
How would you pass this value down to a property of title-component
using the shortcut syntax?