DEV Community

Cover image for A Vue Shorthand for Slots
Kevin Coto🚀💡
Kevin Coto🚀💡

Posted on

A Vue Shorthand for Slots

Named Slots has a shorthand that isn't necessarily shorter but maybe cleaner.

This is the regular way:

<Todo>
<template :description>
<Item/>
</template>
</Todo>

This is the cleaner way:

<Todo>
<template #description>
<Item/>
</template>
</Todo>

Follow me on Twitter to get more pieces of advice about Vue.js

Top comments (0)