We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Did you know that in @vuejs you can add static and dynamic classes to an element at the same time?
<template>
<ul>(
<li v-for="item in list"
:key="item.id"
class="always-here"
:class="{
'always-here': true,
selected: item.selected,
}"
>
{{ item.name }}
</li>
</ul>
</template>
Great tip by @MichaelThiessen.
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.