Performance: v-model for two-way binding
MEDIUM IMPACT
This affects how quickly user input updates the UI and how efficiently data changes propagate between components.
<input v-model="userInput" /><input :value="userInput" @input="userInput = $event.target.value" />
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Manual input binding with :value and @input | Multiple event listeners | Multiple reflows on each input | Higher paint cost due to frequent updates | [X] Bad |
| Using v-model for two-way binding | Single reactive binding | Minimal reflows, batched updates | Lower paint cost with optimized updates | [OK] Good |