Vue 3: Reactivity Made Easy (ref, reactive, toRefs... oh my!)

Vue 3: Reactivity Made Easy (ref, reactive, toRefs... oh my!)

Program With Erik

2 года назад

48,585 Просмотров

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


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

@sangnguyenquang7208
@sangnguyenquang7208 - 22.08.2023 13:41

hi, When would I ever use toRef or toRefs?

Ответить
@olehbaranovskyi2219
@olehbaranovskyi2219 - 16.08.2023 13:44

great explanation, thanks!

Ответить
@Mehdi_Fyber
@Mehdi_Fyber - 13.08.2023 09:58

Tanks for explaining this methods so well ❤❤

Ответить
@HadayatNiazi-xp1fz
@HadayatNiazi-xp1fz - 08.06.2023 10:25

Your skills in Vuejs are awesome.

Ответить
@Undwell
@Undwell - 14.04.2023 21:32

Hey Erik, can this be done with a vanilla JavaScript class object?
I am currently attempting to use a custom class with Vue 3's reactive and it's not keeping the object's property values.
Cheers!

Ответить
@mgcmsn
@mgcmsn - 02.03.2023 07:54

Is Vue still simpler than React to learn?

Ответить
@ricko13
@ricko13 - 14.02.2023 23:41

well, apparently they have put extra effort into making it as confusing as possible LOL

Ответить
@p19shelt
@p19shelt - 04.02.2023 00:33

How do you type so dam fast, and move so fast

Ответить
@user-vj3cu3wv9l
@user-vj3cu3wv9l - 02.02.2023 17:48

You are the best man, I can't describe my gratitude for your easy explanation

Ответить
@TheMitchingHour
@TheMitchingHour - 06.01.2023 09:44

Vue’s weakness is there’s too many ways to do the same thing.

Ответить
@despertaweb4793
@despertaweb4793 - 17.10.2022 10:06

This all seems very promising and your video is pretty clear. BUT, please make a video working with real case reactive & ref objects. 'Cause there's a lots of weird situations like::
Having an empty ref obj and the assigning to it a few props, or dealing with arrays is quite a maze. I've most likely always ended up using ref. Otherwise is creates weird references between component state and pinia for example

Thanks for the content!

Ответить
@Dipenparmar12
@Dipenparmar12 - 17.07.2022 11:14

Thanks for making such great 👍 tutorials

Ответить
@andristefanus
@andristefanus - 05.07.2022 07:01

so fast, this tutorial is even more confusing than vue it self

Ответить
@micemincer
@micemincer - 29.06.2022 11:19

If you use options api it is reactive out of the box

Ответить
@ultimategolfarchives4746
@ultimategolfarchives4746 - 28.06.2022 06:37

Feel like sometime you write some codes because you have it on your other screen instead of explaining the actual "why" and "how it work"

Ответить
@eotikurac
@eotikurac - 11.05.2022 13:12

did any one of the developers at vue stop for a second to think that people who use vue in their job might not be willing to relearn the same crap over and over again? i am currently unable to get a piece of text from the data i fetched because of this ref bs.

Ответить
@zombaju
@zombaju - 10.05.2022 21:41

Hi Eric, I would like to tell you that there is probably a collision or some kind of error when two times the word ref is imported. I am thinking of importing ref from "firebebase/database" and "vue"....
have you ever encountered such a situation? I will probably have to separate a certain piece of code into a separate file

Ответить
@AmitKumarKhare
@AmitKumarKhare - 20.04.2022 17:41

Made awesome Vue2 then complicate it, and it's Vue3.

Ответить
@musicofmarlon
@musicofmarlon - 26.03.2022 16:02

I thought Vue was supposed to be "easier" to use than React. But if Vue is gonna become more complicated than it has known to be and tries to be like React, then I might as well just use React and not even think about Vue at all.

Ответить
@chikenmacnugget
@chikenmacnugget - 09.02.2022 12:52

why do you use composition api every time? It's purely additive. Read the docs. I think you are low competence developer

Ответить
@loic.bertrand
@loic.bertrand - 01.02.2022 23:36

Wow thanks you made me discover that we can use a "setup" script tag instead of a setup function for single file components 😮. I learned Vue one week ago, begining with the Options API, then switching to the Composition API, learning about class based components and now about setup script tags... That's kind of overwhelming and hard to know what's the most recent recommended way of writing a Vue app. 😅

Ответить
@rhiox7705
@rhiox7705 - 20.01.2022 03:35

i really dont understand why they change so much from vue 2 to vue 3, i know we can stil program like vue 2 in vue 3, but i woudl like to know what is the improvement at the cost of not doing things
straigforward like in vue 2?

Ответить
@jafetsierra1875
@jafetsierra1875 - 17.01.2022 01:10

Hi, nice vid.

How did you make those auto-comments in VS code ? Is there any command? Or is just an extension?

Ответить
@WinstonCodesOn
@WinstonCodesOn - 14.01.2022 20:44

Thanks so much for this great overview! I did some Vue 2 code, and then I opened up someone else's program with some of the Vue 3 features in it (I didn't even know it at first). I saw this Ref<String> and unrefs everywhere and was like wtf is this! Your video saved me hours of pounding my head against the wall figuring out this code.

Ответить
@adriatic123
@adriatic123 - 06.01.2022 01:10

Question, how to use nodejs server in Vue Vite bundler.

Ответить
@DanielRios549
@DanielRios549 - 31.12.2021 21:45

It is too much strange to put Javascript code inside a string or double curl braces, both are JS code, there is no reason to put one inside double curl braces and other inside strings, they should change this, both React and Svelte do this the right way, using one curl brace for everything that is Javascript inside the template, doesn't matter if it is a children or an attribute

Ответить
@jorgebarragan8521
@jorgebarragan8521 - 23.12.2021 03:20

Nice video,

Ответить
@merlinchiodo8943
@merlinchiodo8943 - 05.12.2021 11:55

Hey Eric,

I have a problem. I just want to make a global variable isLoggedIn, that i can change to "true" or null. How can I do this?

Ответить
@metronomo1676
@metronomo1676 - 14.10.2021 12:33

Other great video!! Thanks Erik!

Ответить
@osmelguarepo6523
@osmelguarepo6523 - 07.10.2021 02:39

How about to make changes reactive from pure js?
1. Get element by ID
2. Change its value
3. This will update vdom?

Ответить
@prophetMuhammad69
@prophetMuhammad69 - 25.09.2021 00:29

I will soon be making Vue js tutorials

Ответить
@dvdrtrgn
@dvdrtrgn - 23.09.2021 07:46

This is great stuff! Custom refs example was gold

Ответить
@shaineelnayak3465
@shaineelnayak3465 - 22.09.2021 17:45

Hey erik thank you because of you i found out vue and it's my favorite framework

Ответить
@mardix
@mardix - 22.09.2021 03:48

Now I know how to make a cube: 10x20x33 …. Repeat after me, that’s a cube.
BRB… going under shower crying 😭

Ответить
@justinangeloperez5650
@justinangeloperez5650 - 22.09.2021 02:34

that's not a cube

Ответить
@toanvuongxuan2353
@toanvuongxuan2353 - 21.09.2021 19:10

Please help me, how to use trigger click button in setup() method in vue 3 (Vue 2 i used this.$refs in methods, but Composition API I can't)

Ответить
@sergenorin
@sergenorin - 21.09.2021 18:28

We discovered a new type of cube which sides are not equal to each other 😂

Ответить
@kwesikwaa9204
@kwesikwaa9204 - 21.09.2021 12:15

Hello Erik. great video and thanks for sharing.
but one question..i see there seem to be massive change in the script block..no setting of variables on a data function etc it is just straight variables and functions like in Svelte..is that the new paradigm?

Ответить
@andreaskarz
@andreaskarz - 21.09.2021 08:37

So unfortunately Vue is becoming more and more like React. I don't understand why you always have to complicate things that work well. It was already like that with Angular and now Vue is making the same mistake. Too bad. I will work as long as possible with Vue v2, it is fast, efficient and uncomplicated. Exactly what most developers want.

Ответить
@RianY2K
@RianY2K - 21.09.2021 07:24

This reactivity feature very useful in Vue JS 3

Ответить
@PriyankBolia
@PriyankBolia - 20.09.2021 20:13

Just a suggestion, you can tell more VS code shortcuts that you uses, like line delete, comment line, etc. I can search, but it will be more helpful to see what you are using and where, instead of reading about shortcuts.

Ответить
@GergelyCsermely
@GergelyCsermely - 20.09.2021 16:45

Thanks!

Ответить
@LeoPlaw
@LeoPlaw - 20.09.2021 16:45

Is Vue 3 essentially Vue 2 + Composition API ?

Ответить
@yanyam7700
@yanyam7700 - 20.09.2021 15:55

Wait, I didnt know you could get away with using your refs in the template without returning them first? I didn't like the composition API, because of how much I had to import things, or type extra, or worry about how I'm going to organize all the code. Do you think everyone should use the composition API? Or am I okay with sticking with the options API

Ответить
@kirillbaryba746
@kirillbaryba746 - 20.09.2021 15:48

nice ^) thanks

Ответить