Menu
×
×
Correct!

Exercise:

What directives are needed to provide data from a components slot to the parent?

Local data in a component is sent from a slot with v-bind, and it can be received in the parent with v-slot. CompOne.vue: <slot v-bind:lclData="data"></slot> App.vue: <comp-one v-slot:"dataFromSlot"> <h2>{{ dataFromSlot.lclData }}</h2> </comp-one>
Local data in a component is sent from a slot with v-bind, and it can be received in the parent with v-slot. CompOne.vue: <slot :lclData="data"></slot> App.vue: <comp-one v-slot:"dataFromSlot"> <h2>{{ dataFromSlot.lclData }}</h2> </comp-one>

Not Correct

Click here to try again.

Correct!

Next ❯
Local data in a component is sent from a slot with , 
and it can be received in the parent with .

CompOne.vue:
<slot :lclData="data"></slot>

App.vue:
<comp-one :"dataFromSlot">
  <h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>

    
  




Log in to keep your progress
Sign up to keep your progress

Completed 0 of 54 Exercises:

VUE Get started
VUE Directives
VUE Methods
VUE Computed
VUE Watchers
VUE Scaling up
VUE Components
VUE Slots
VUE Refs
VUE Lifecycle hooks
VUE Provide/Inject
VUE Routing
VUE Animations
VUE Build

×

Reset the Score?

This will reset the score of ALL 54 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 54 VUE exercises.

Share your score: