DEV Community

loading...

Discussion on: VueJS - Different ways to implement v-model

Collapse
keithmchd48 profile image
Keith Machado • Edited

Hey Pablo, I experimented with all these ways with Vue 3 and here is what I found out:
1 and 6 are the only ones which worked for me.
For 2, 3, 4, and 5, they did not work with the code you have posted in this blog.

One minor update for #6, I get this error when I try to use the ".sync" modifier.
'.sync' modifier on 'v-bind' directive is deprecated. Use 'v-model:propName'

You can check out my code in this repo:
github.com/keithmchd48/v-model-ways

Live example of all these different implementations:
v-model-different-ways.netlify.app/

Collapse
vcpablo profile image
Pablo Veiga Author

Hey @keithmchd48 ,
I have updated the article mentioning the breaking changes in VueJS 3 and have also added a link to a repo with all (possible) implementations for both versions 2 and 3 of VueJS.
Thank you very much for your help and kindness.

Forem Open with the Forem app