Episode 31 - August 24, 2020

Navigating Scoped Slots

00:00 / 00:00

This episode is sponsored by...

Special Offer

Enjoy the Vue listeners get 30% off for six months. Simply mention "Enjoy the Vue" when signing up, and they'll apply the discount to your account. No credit card required.

Shownotes

Welcome to Enjoy the Vue! On today’s episode we are discussing Scoped Slots! Ben is here to help us gain a better, less frightening understanding of them. We start out by explaining Slots, Scoped Slots, and Slot props. Tessa and Ari bring up questions to Ben throughout the episode and he gives advice and guidance on what to do. Download this episode now to make your way through Scoped Slots without fear!

Outline

[00:02:26] Before we get into Scoped Slots, Ari, Tessa, and Ben explain what Slots are first, for those who never used it before

[00:04:45] Tessa and Ari tell us what Scoped Slots are to them. Ben goes into the select drop down menu, uses a library book analogy, and explains the concept of slot props.

[00:10:00] Tessa poses a question to Ben about if the child can show the parents the child’s data, but the parents can’t mutate it or if the child has to specify which parts of its data the parents can access a mutate.

[00:16:56] Tessa asks Ben about how to restyle with a string and Ben tells her what to do.

[00:25:30] Tessa asks Ben if it’s possible or not possible to access the scoped plot data in the script tag. Also, Ben lets us know what kind of components he is in favor of.

[00:28:40] Tessa tells Ben her takeaway on a use case and wants Ben to tell her if it’s right or wrong.

[00:33:32] Ari tells us where she always gets tripped up and it has to do with the difference in mental model.

[00:38:51] Tessa wants to know if $slots and/or its children are not reactive and does it have to be observed in some kind of deep way? Also, what kind of caveat do we have to be aware of when we’re working with slots in the JavaScript part of the single file component?

[00:42:06] Tessa gives us an update on an old GitHub issue on $slots.

Resources mentioned

Transcript

Coming soon!