Oct 9, 2019 in Vue.JS
Q: What are the difference between slots and scoped slots in Vue JS

1 Answer

0 votes
Oct 9, 2019

A slot is a placeholder in a child component that is filled with content passed from the parent. Content of a regular slot is compiled in the parent’s scope and then passed to the child component.

Thus you can’t use child component properties in a slot’s content. But scoped slots allow you to pass child component data to the parent scope and then use that data in slot content.

Related questions

0 votes
Oct 9, 2019 in Vue.JS
0 votes
Oct 7, 2019 in Vue.JS
...