Zero to Code
Published in

Zero to Code

WTF is Two-Way Binding in VueJS?

Vuejs: the Progressive Javascript Framework
<input v-model="message" placeholder="edit me">
<p>Message is: {{ message }}</p>

How is this different from v-bind ?

<input
v-bind:value="something"
v-on:input="something = $event.target.value"
>
<input
:value="something"
@input="something = $event.target.value"
>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christopher Agnus 🐟

Hi, I’m Christopher (Agnus) Lam. I write about startups, entrepreneurship and marketing.