Put in order · Vue.js course · Module 2: Template Syntax
Conditional Rendering Process
Order the steps of v-if in Vue:
Items to put in order
- Vue checks the condition value
- Condition false: the element is removed from the DOM
- Condition true: the element is rendered in the DOM
- Condition change: Vue re-evaluates and updates the DOM
Show the answer
Correct order:
- Vue checks the condition value
- Condition true: the element is rendered in the DOM
- Condition false: the element is removed from the DOM
- Condition change: Vue re-evaluates and updates the DOM