Vue · Junior · Question 20 of 75

What is the difference between v-if and v-show?

Explanation

v-if has a higher toggle cost but nothing is rendered while false; v-show has a higher initial cost but cheap toggling. Use v-show for elements that toggle often.

Further reading

Problem with a question

Vue · Junior · question 20

Test yourself

Take the Vue · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz