v-if — DOM manipulation. v-show — CSS toggle.
Performance comparison:
1<template>2 <!-- v-if: adds/removes from DOM -->3 <div v-if="show">Expensive component</div>45 <!-- v-show: toggles CSS -->6 <div v-show="show">Expensive component</div>7</template>
When to use: