Problem Statement
How does v-model work under the hood for native inputs?
Explanation
For native inputs, v-model expands to :value (or :checked for checkbox/radio) plus an @input (or @change) listener that writes back to the bound state. For example, v-model="text" compiles roughly to :value="text" and @input="text = $event.target.value".
Code Solution
SolutionRead Only
<input v-model="text"> <!-- roughly equals --> <input :value="text" @input="text = $event.target.value">