I didn't know this Vue pattern existed (but I LOVE it)

I didn't know this Vue pattern existed (but I LOVE it)

LearnVue

1 год назад

12,838 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Abdoun abdou
Abdoun abdou - 19.06.2023 00:08

I wish you provide the source code

Ответить
Ult 19x
Ult 19x - 19.03.2023 04:30

Your tutorials are the best on YT! That being said, I find myself frustrated with the level of extra complexity and "magic" that happens with Vue3/Nuxt. There's so much ambiguity as to when a component is getting rerendered. I feel sad to move to React/Next or SolidJS but I just can't deal with all this. Doing simple things like passing a reactive variable to be updated by a grandchild leaf is so overly complicated.

Ответить
Andreas
Andreas - 10.03.2023 13:19

My opinion is you speak way to fast to understand the whole situation.

Ответить
Maine
Maine - 07.03.2023 11:05

Who would have thought there is already a vueuse composable for it, that's to uncommon!

Ответить
Ricardo Silva
Ricardo Silva - 03.03.2023 22:51

I do this a lot, but useVModel is new for me, thanks!

Ответить
Emrah ATILKAN
Emrah ATILKAN - 17.02.2023 22:17

I believe you just wanted to make the title interesting.

Ответить
Faizan Ullah
Faizan Ullah - 16.02.2023 11:28

Amazing. I was starting to get annoyed by constantly creating and using emits. This makes it so much easier.

Ответить
Stefano Bozzi
Stefano Bozzi - 15.02.2023 07:18

Awesome and combined with multiple v-models now in Vue 3 this will be so clean and beautiful.

For example:

<AppForm
v-model:name="name"
v-model:surname="surname"
v-model:profession="profession"
/>

And in the child component we'll receive them as props:

const props = defineProps({
name: {
type: String,
required: true,
},
surname: {
...
},
profession: {
...
},
})

const emit = defineEmits([
'update:name',
'update:surname',
'update:profession',
]);

//Define your computed props here :D

Ответить
credible white boy
credible white boy - 14.02.2023 23:27

Hi, do you think you could approach native/hybrid development for a quick breakdown. It seems like it is doable in Vuew, but through which tool is it best and why/if it is behind React etc...

Ответить
Ian Zamojc
Ian Zamojc - 11.02.2023 13:59

One place a writable computed is useful is as an alias to deeply nested values in an object hierarchy. now something like user.profile.darkMode can be aliased to just darkMode.

Ответить
Dipenparmar12
Dipenparmar12 - 11.02.2023 11:42

Amazing trick, i knew about writable computed properties, always wondering what is the use case of this now i know, amazing idea. Love it

Ответить
Carlos Enrique Piñeiro
Carlos Enrique Piñeiro - 11.02.2023 03:03

Great! I still don't understand and have to see it a few more times and code it, but Great!

Ответить
First name Last name
First name Last name - 10.02.2023 22:20

Thank you for the video, keep up the great work

Ответить
Sy D
Sy D - 10.02.2023 21:11

Maybe that's the clean way I was looking for interacting with API from Child components without having to make the request process on each component.

Ответить
Hanes
Hanes - 10.02.2023 21:10

I've been learning it the wrong order then. I knew about computed writable, but didn't know about the @update:model thing.

Ответить
Ivan Bragin
Ivan Bragin - 10.02.2023 19:26

Dude, you are just in time. I was looking exactly for something like this

Ответить
Abat
Abat - 10.02.2023 18:57

This is so cool

Ответить
Desdevol
Desdevol - 10.02.2023 17:06

I've used this technique before in Vue 2. It was useful for me to refactor a long form that has many sections. Since we should not mutate props directly, emitting event from each form component sounds very silly, with this technique, I could just emit the form section's object to parent whenever my form component's v-model changes.

Ответить
Rituraj
Rituraj - 10.02.2023 16:51

I still think computed should only be used for readable purposes only

Ответить
Sduduzo Gumede
Sduduzo Gumede - 10.02.2023 16:24

I love these videos so much

Ответить
Jahid Anowar
Jahid Anowar - 10.02.2023 16:21

Awesome content man!. I've been using it since vue 2. Nice to see other developers recommending it.

Ответить
Phojie
Phojie - 10.02.2023 16:19

why not using watch ? instead of that.

Ответить
Guy From Photostock
Guy From Photostock - 10.02.2023 16:12

I felt so big brained when I discorered this own my on a couple months ago

Ответить