How To Use The New Vslot Directive In Vuejs

I’m so excited to see how’s people liking VueDose! I received amazing feedback about the performance tips published so far. I’m so grateful about the support and the compliments 🤗.

Last week the version 2.6.0-beta.3 of Vue.js was released, enabling a new feature to simplify scoped slots even more.

It introduces the new v-slot directive and its shorthand, as described in the RFC-0001 and RFC-0002.

In order to understand how it does simplify the syntax, let’s see how’s it in current scoped slots. Imagine you have a List the component that exposes a filtered list as its scope.

The way you’d use that List scoped slot would be similar to: