Комментарии:
I wish you provide the source code
Ответить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.
ОтветитьMy opinion is you speak way to fast to understand the whole situation.
ОтветитьWho would have thought there is already a vueuse composable for it, that's to uncommon!
ОтветитьI do this a lot, but useVModel is new for me, thanks!
ОтветитьI believe you just wanted to make the title interesting.
ОтветитьAmazing. I was starting to get annoyed by constantly creating and using emits. This makes it so much easier.
Ответить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
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...
Ответить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.
ОтветитьAmazing trick, i knew about writable computed properties, always wondering what is the use case of this now i know, amazing idea. Love it
ОтветитьGreat! I still don't understand and have to see it a few more times and code it, but Great!
ОтветитьThank you for the video, keep up the great work
Ответить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.
ОтветитьI've been learning it the wrong order then. I knew about computed writable, but didn't know about the @update:model thing.
ОтветитьDude, you are just in time. I was looking exactly for something like this
ОтветитьThis is so cool
Ответить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.
ОтветитьI still think computed should only be used for readable purposes only
ОтветитьI love these videos so much
ОтветитьAwesome content man!. I've been using it since vue 2. Nice to see other developers recommending it.
Ответитьwhy not using watch ? instead of that.
ОтветитьI felt so big brained when I discorered this own my on a couple months ago
Ответить