This New Vue 3.3 defineModel Macro Will Change The Way You Write Your Components

preview_player
Показать описание


#vue #vue3 #slots #props
Рекомендации по теме
Комментарии
Автор

I needed to create a spinner component with many inputs element and this macro will definitely help me for my use case

anujshrestha
Автор

Takes a while getting use to... Also, what I will never understand: is "update:modelValue" a reserved name? Like, can I also name it "update:content"?

randomtimessomehow
Автор

I wish the original syntax were simpler (a`la vue2) and wouldn't require abstractions like these :/

poolkrooni
Автор

This is a typescript only macro? How does this work with pure js (no ts)?

codedjango
Автор

Can i use this to a vuejs2/nuxt2 with composition api setup project? Thanks :)

hectormorada
Автор

its nice but I wish they called it something like defineModelProp … more true to what it is

tannercampbell