Vue · Senior · Question 9 of 75
What makes Vue's virtual DOM "compiler-informed"?
- ✓Correct answer: The template compiler adds patch flags and hoists static content, so the runtime diffs only dynamic parts
- 2Templates are compiled to WebAssembly
- 3Vue doesn't use a virtual DOM at all
Explanation
Patch flags tell the runtime that, for example, only class or text can change. Block trees flatten dynamic nodes so the diff skips static structure entirely.