Fair point! I updated that to hopefully explain what's going there. There are more details in the next snippet as well :)
This is a use of scoped slots (Vue 2.6+), and it allows the slot content simple access to data that only the child component has. (vuejs.org/v2/guide/components-slot...)
Hope that helps!
(P.S. Realized now, that the <slot> I wrote there got rendered away... But leaving this in case someone actually wants the information. 🤦)
Finally, we pass bind :open and :toggleOpen to our
To our what James?! To our what?!
Fair point! I updated that to hopefully explain what's going there. There are more details in the next snippet as well :)
This is a use of scoped slots (Vue 2.6+), and it allows the slot content simple access to data that only the child component has. (vuejs.org/v2/guide/components-slot...)
Hope that helps!
(P.S. Realized now, that the
<slot>
I wrote there got rendered away... But leaving this in case someone actually wants the information. 🤦)Much clearer, thanks for the update!