The Difference Between Vue and React

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ส.ค. 2023
  • 📗 Book (Updated Aug 2023): lachlanmiller.gumroad.com/l/v...
    🐦 Twitter: / lachlan19900
    Today I talk about the philosophical difference between Vue and React and how it impacts the reactivity system of the two frameworks.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 149

  • @aryagoswami4152
    @aryagoswami4152 10 หลายเดือนก่อน +99

    I have worked on enterprise projects with both React and Vue 2 and 3. Based on my experience, Vue is comparatively lot better than React. As you said, it gives one fine-grained control and neat code with readability.

    • @luckyardhika3781
      @luckyardhika3781 9 หลายเดือนก่อน +7

      But react is more flexible, i switch my project from vue to react because of biggest community and flexibility

    • @MichaelWalmsleyJr
      @MichaelWalmsleyJr 8 หลายเดือนก่อน +9

      For basic interactivity I don't mind either. For complex interactivity that requires lots of data loading, timers, Dom syncing etc. I've found React to be more confusing for junior Devs and harder to debug all the race conditions that get introduce if you don't know how to use use effect effectively

    • @rebsy
      @rebsy 8 หลายเดือนก่อน

      Just want to point out this delightful mirroring at the end of your sentence "use use effect effect(ively)"! @@MichaelWalmsleyJr

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน +13

      ​@@luckyardhika3781 can you explain in what ways React is more flexible? Also, what exactly you wanted to have in Vue ecosystem that didn't exist and most importantly why you wasn't able to build it yourself?

    • @whoknows3679
      @whoknows3679 5 หลายเดือนก่อน

      @@luckyardhika3781it has bigger community yes, not sure about being more flexible
      Both react and vue can do the same

  • @Pouya..
    @Pouya.. 8 หลายเดือนก่อน +55

    Im a Senior backend developer and as you know we suck at front end 😀 but i worked with both react and vue (2,3) for me the react terminology was so of the grid …. I never could relate to all that hook names like useEffect useState …. But on the other hand vue was is just really really easy to relate … and now with Vue and composition api im sure i will never look back at react

    • @kishirisu1268
      @kishirisu1268 4 หลายเดือนก่อน

      Pathetic sinior failed in React 😂

    • @oinn6216
      @oinn6216 3 หลายเดือนก่อน

      I'm curious how did you managed to learn backend if you can't remember 2 hooks. please tell that it much easier to remember bunch of directives and lifecycle methods from Vue then 2 React hooks aaaand that's it because all events looks like native 😂

    • @Pouya..
      @Pouya.. 3 หลายเดือนก่อน

      @@oinn6216 actually it’s not about just hooks it is about the design of the language. With Vue composition api i can easily adopt my backend knowledge with that in terms of architecture and competent relations and not focus on life cycles and those stuff.

    • @malangope
      @malangope 3 หลายเดือนก่อน

      @@oinn6216 Thats just two hook examples, there are more like useReducer or useImperativeHandle etc. I too think the naming makes no sense until you dive deep in the respective functionality.

    •  3 หลายเดือนก่อน

      @@oinn6216 its not about learning, its about how its getting used to backend programming. "rendering" concept is not in backend, so backend engs have hard time to understand whats going on. but vue seems more relatable to backend developers, at least for me.
      believe me i have very good engineer friends, all experienced same for their "toy projects" that in their first time frontend development.

  • @1haker
    @1haker 5 หลายเดือนก่อน +51

    Worked few years with Vue, now few months with React and im done, im going back to Vue.

    • @user-re6im7dm1x
      @user-re6im7dm1x 3 หลายเดือนก่อน +1

      true. same with me, In vue. things are more transparent and more more sense. React is ugly

    • @user-re6im7dm1x
      @user-re6im7dm1x 3 หลายเดือนก่อน

      but unfortunately less jobs in Vue

    • @praveshishere
      @praveshishere 2 หลายเดือนก่อน

      @@user-re6im7dm1x that gonna change soon, as people start to appreciate vue

    • @DmitriiBaranov-ib3kf
      @DmitriiBaranov-ib3kf 6 วันที่ผ่านมา

      ​@@user-re6im7dm1xwe should push it forward and abandon react. I got a Vue job for 97k/year

  • @johnm8358
    @johnm8358 10 หลายเดือนก่อน +38

    Very well explained...the opt in/ opt out way of putting it really makes sense

  • @rafaveggi
    @rafaveggi 9 หลายเดือนก่อน +12

    Great side by side comparison and explanation, very insightful. Thanks a lot for sharing

  • @yannmasoch
    @yannmasoch 8 หลายเดือนก่อน +14

    I use Vue for a long time and I was wondering if I had to switch to React because it's easier to find React engineers than Vue engineers. But after watching this video I am going to keep Vue!

    • @LachlanMiller
      @LachlanMiller  8 หลายเดือนก่อน +3

      It's definitely easier to recruit and to find a job as a React dev, that's for sure. I've done a lot of React professionally, despite knowing Vue very well.

    • @yannmasoch
      @yannmasoch 8 หลายเดือนก่อน +2

      @@LachlanMiller Yes. Also, I saw another video from another YT channel showing side by side Vue and React for coding the exact same simple things. I don't like how React offers data binding or state management for example. I'm keeping Vue + Vite + Pinia 👍

    • @7iomka
      @7iomka 4 หลายเดือนก่อน

      Hi, how the name of that video?@@yannmasoch

  • @ProgramWithErik
    @ProgramWithErik 10 หลายเดือนก่อน +6

    Nice explananation! When I moved from Vue 3 to React for the first time I made some rookie mistakes on reactivity in React, that you pointed out. Like not assuming the rerenders on a double. They are quite different.

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน +1

      Woah, hey Erik - long time fan of your content, never thought you'd be commenting on one of my videos! Appreciate the complement!
      I had the opposite experience of going from Vue to React - I like them both, but the fundamentals of the reactivity system are really different, and I have found knowing how your tool works, at least conceptually, to be very useful.

  • @turboruninc
    @turboruninc 7 หลายเดือนก่อน +22

    I trust Evan You and his team (Vue, Vite, Nuxt, Pinia, etc). Currently, Vite is used by several frameworks, including Angular recently.
    if Vite is that good then Vue should be the same. because it's from the same developer.

  • @huzaifamalik2346
    @huzaifamalik2346 9 หลายเดือนก่อน +4

    helped me allot to understand Vue as a React developer, Good Teacher

  • @mohamadybr
    @mohamadybr 3 หลายเดือนก่อน +3

    I like both frameworks. I used React a lot back in my uni and worked as a Vue(2) developer - soon I have to migrate to Vue 3. I like both! I enjoy the simplicity of Vue and the ability to move fast, but in all honesty, I prefer React! Although it is more difficult to manage, the amount of experience you gain is unmatched! I had to, forcefully, learn a lot of things in React to implement good Apps, but with Vue, it was just there! so far working with Vue2, I feel like I had to spend more time learning the framework than learning how to think about the problem I'm solving. To me, React gives more opportunities to be a better programmer as you have to learn more concepts and be more involved. On the other hand, Vue is just more relaxing to work with

  • @skateboardsmart
    @skateboardsmart 10 หลายเดือนก่อน +8

    Briliant explaination!

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน +2

      Thanks a lot!

  • @stefandili2650
    @stefandili2650 10 หลายเดือนก่อน +1

    Great video, and just in time as always! 😁 🙏

  • @Shlomtzion1980
    @Shlomtzion1980 4 หลายเดือนก่อน +1

    Good, simple explanation accompanied with simple examples. This was good and informative. Thanks!

  • @nussbrot
    @nussbrot 10 หลายเดือนก่อน +2

    Great video, good explanation, straight to the point

  • @atomicCache_
    @atomicCache_ 4 หลายเดือนก่อน +1

    Great. Thanks for sharing this video lachlan 😊😊

  • @rameshsharma-426
    @rameshsharma-426 5 หลายเดือนก่อน +1

    explanation 👌 loved it ❤

  • @YankaZabka
    @YankaZabka 6 หลายเดือนก่อน +1

    Solid material. Thanks a lot!

  • @codybontecou
    @codybontecou 10 หลายเดือนก่อน +5

    Great stuff, as usual, Lachlan, thank you. Looking forward to future content.

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน

      Thanks Cody - I am rejiggering my schedule so I have more down time to work on things like content creation.

  • @matanon8454
    @matanon8454 7 หลายเดือนก่อน

    Thanks for this video! ❤

  • @handmadegamesdev
    @handmadegamesdev 17 วันที่ผ่านมา

    Great video. This is exactly the type of breakdown I was looking for.

  • @clustersnake
    @clustersnake 10 หลายเดือนก่อน +9

    I am currently working on a react native application because as a Venezuelan I don't want to starve :D and I really miss Pinia and the reactivity system so much!

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน +1

      I tried RN once, it seems good for simple apps but not so great for complex ones. Building native apps with Vue sure would be nice, I think there's been a few things but nothing solid yet.

    • @clustersnake
      @clustersnake 10 หลายเดือนก่อน

      @@LachlanMiller I saw a vue-react-native connector but I didn't have a chance to try something different in this project

    • @fdsoilmvc4801
      @fdsoilmvc4801 10 หลายเดือนก่อน

      @@clustersnake I am Venezuelan and I live in Venezuela and before starting with Vue2 I did a study comparing with Reat, Angular and Svelt. In fact, the one I liked the least was React. I share this video for mobile applications: th-cam.com/video/IyK3ExPVR18/w-d-xo.html

  • @jnmldo
    @jnmldo 6 หลายเดือนก่อน +1

    I like your video. I come from React world and I have no clue about Vue but with this video I have a start point. Thank you for your work!

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน +1

      No problem, I've mostly got React contracts lately... happy with both, glad we have lots of solid choices in the frontend world nowadays!

  • @anapartybharath33
    @anapartybharath33 3 หลายเดือนก่อน +1

    this is probably the best video on internet, that explains the difference b/w react and Vue

  • @serhiicho
    @serhiicho 2 หลายเดือนก่อน

    Good explanation! Thanks

  • @GringoDotDev
    @GringoDotDev 10 หลายเดือนก่อน +1

    great video!

  • @mlv60
    @mlv60 หลายเดือนก่อน +1

    0:47
    not very important but potentially good habit/convention for both readability (separation of concerns) and consistency with vue's approach:
    you can extract the anonymous function from the jsx into an appropriately named const and then just simply pass it in the jsx event.
    this way any changes you make to the logic will be done in the logic part of the code (just like in vue) and if you are writing a more complex function it would look ugly and clutter the jsx. this way, simple or complex, your logic consistently shows up where its expected and you and your team will frown less :]
    edit:
    the reason i mention consistency with vue is that its easier to switch or be good at both the more similar they are, in general

  • @adiorthotos
    @adiorthotos 10 หลายเดือนก่อน +18

    Vue's mental model seems easier to grasp, the code simpler to read and obviously performs better since it only renders what's needed vs everything each time.

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน +3

      I like this model better, but there's certainly something nice about React's "just re-render it all" model, too. It does make optimising a bit more difficult, though.

    • @adiorthotos
      @adiorthotos 10 หลายเดือนก่อน +7

      ​@@LachlanMiller yeah, especially since in react one has to explicitly define dependencies for reactive parts. Vue automatically resolves all those for the user. I'm talking about the dependency array in `useMemo` and the.. absence of any such thing in vue's `computed`.
      Coding in react I feel like I'm constantly stressing myself to not forget something or make some mistake and tank performance. I feel like I'm babysitting react in a sense or hopping around mines on a field. When using vue, it feels more like I'm just putting my thoughts in code knowing the FW has my back. There's something about this DX that makes such a difference in how one _feels_ when using each, that it's hard to describe to others.

    • @Feronom
      @Feronom 10 หลายเดือนก่อน +1

      @@adiorthotos what about when using svelte or angular?

    • @adiorthotos
      @adiorthotos 10 หลายเดือนก่อน

      ​@@Feronom I used to be a staunt supporter of Angular after using it for >2y in prod and before I check vue. Angular is still a valid choice (as any FW is), especially for teams coming from Java or C# background which love object-oriented programming and enjoy "fluffy" code with lot's of fanfare and bike-sheding, although that (esp the first part) already shows some manager is doing something wrong and should be using competent front-end devs instead of back-end ones (the FE is way too advanced and complex these days) to fill a FE role. The other problem I now have with angular is that it's always a tech luggard. They were the last template-using FW to use AOT render functions (project Ivy), the last one to ditch TSLint, Protractor, Karma, Jest, Webpack, ... and it's noticeably less performant (althouh apps are more slowed down due to bad client code that FW overhead).
      I have only little experience with Svelte. Till now, it seems to come with many of the good things Vue/Nuxt brings, without the ecosystem depth nor the vibrant community. It lacks JSX support, which (even though I don't like it) is necessary for cases where the template doesn't cut it, e.g. very dynamic rendering cases, often in library components. It's reactivity model is a leaky astractrion, IMO, much like Angular's with Zone.js . For example one can cut&paste a code from a .vue file's `` into a `useThing.ts` file and everything will keep working as expected. all the `$`-based DSL syntax from .svelte files isn't transferable/refactorable to .ts files.
      Vue 3 has (AFAIK) the cleanest, most thorough reactivity model. And due to it being based on a JS primitive (Proxy) instead of creating a unique bespoke abstraction, as is the case with all other FWs mentioned, it results in having much fewer gotchas and footguns, having very good perf and being very intuitive and easy to learn (vs e.g. Angular).

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน

      I also like Svelte@@Feronom

  • @jamesgraham1462
    @jamesgraham1462 4 หลายเดือนก่อน

    Well said. Thank you!

  • @user-hx1lp6fc9r
    @user-hx1lp6fc9r 7 หลายเดือนก่อน +5

    Hey, thanks for your video, very concise and well structured. I'm a huge Vue advocat and every time React forces me to write className in component props to pass some adjustment just makes me sick ☺️

    • @LachlanMiller
      @LachlanMiller  7 หลายเดือนก่อน

      Thanks for the comment. I enjoy Vue a little more but I think React is fine too, I don't really take issue with `className`. I miss 2-way binding with `v-model` the most.

  • @Maeckboom
    @Maeckboom 10 หลายเดือนก่อน +1

    Well said

  • @aschmelyun
    @aschmelyun 10 หลายเดือนก่อน +18

    Nice comparison! I've been a massive fan of Vue for years, but have recently started using React more and honestly... I'm enjoying it a lot. It feels closer to "actual" JavaScript and I think that's part of the appeal.

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน +2

      I've used both for many years and like different aspects of both. Spoiled for choice in the frontend ecosystem!

    • @zede1697
      @zede1697 8 หลายเดือนก่อน +4

      Ok more actual JS. Synthetic events? ok... How often do you use Set / Map in your React App? I can guess... never (except working with stm that support it like MobX). React don't repspect your REAL JS skills. In React you use just subset of JS: ReactScript. In Vue you aren't limited by framework capabilities as in React: use mutability. Use Objects, functions (composables you can use as normalk functions where you want. Hello for react 3 hooks rules), use ALL JS types as your want. I want to know. What makes React more "actual" JS than Vue?

    • @LachlanMiller
      @LachlanMiller  8 หลายเดือนก่อน

      @@zede1697 Hey, I am a little confused - are you saying you prefer React or Vue?
      I use Set/Map pretty often, those are quite useful! I like working with both frameworks.

    • @alex97480
      @alex97480 6 หลายเดือนก่อน

      To be honest for me as I have a business, I use vue /Nuxt a lot more not because I want or because I feel in close to Javascript it's just I made different trust with 30+team with no experience. Everyone is more productive in vue that react and that's it they get shit and at lower level a lot more optimize than see react.... With better doc.
      You use react if :
      -you have time
      - you have budget
      -you need react native
      - you are Already senior level in react and don't need to bother with anything else
      There you're reason if not just use vuejs, time to market will be significantly lower, more performant and easier to upgrade

  • @wobsoriano
    @wobsoriano 10 หลายเดือนก่อน

    You the real MVP as always Lachlan

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน

      You are the real MVP

  • @riccarrasquilla379
    @riccarrasquilla379 8 หลายเดือนก่อน

    thanks for the video

    • @LachlanMiller
      @LachlanMiller  8 หลายเดือนก่อน

      Thanks for the comment!

  • @JkeyKong
    @JkeyKong 6 หลายเดือนก่อน +1

    i feel that react will eat my memory a lot if I forgot set terms in useEffect

  • @user-zn6su5hx8l
    @user-zn6su5hx8l 6 หลายเดือนก่อน +1

    Wow! best video eva

  • @atlantic_love
    @atlantic_love 24 วันที่ผ่านมา +1

    For the Vue side, it appears to me that you have a function called watchEffect, but when the button is clicked it is calling a function named onClick. I don't understand this.

  • @cat-.-
    @cat-.- 4 หลายเดือนก่อน

    I’m familiar with react and svelte, it seems like vue is really similar with svelte 5 rune mode, is there a big difference between the 2? I gave up on react because I don’t like the many, many warts of the reactivity system such as not being able to factor out code to anywhere but top scoop of function, and custom hook schenanigans. I feel fine grained reactivity is a lot more intuitive.

    • @LachlanMiller
      @LachlanMiller  4 หลายเดือนก่อน

      Not too familiar with runes - I think it's a step closer to Vue though, where reactivity is decoupled from the component and rendering system, which I like. I think from a user point of view Svelte/Vue might be conceptually similar, the actual implementation (fine grained compile type vs observer/tracking based) is quite different. Will need to learn more about Svelte runes! Do you enjoy working with those?

    • @cat-.-
      @cat-.- 4 หลายเดือนก่อน

      ​@@LachlanMillerI am still trying out Svelte 5 runes since it's so new. It feels amazing mainly because states are entirely consistent now across .svelte and .ts files, no more .subscribe() to stores which was the main cause of headaches. Now, they use Proxy object to make reactivity work plain ts files, and this is the most fun I've had since I first moved from angular to nextjs.

  • @bpospanov
    @bpospanov 10 หลายเดือนก่อน +1

    great

  • @malangope
    @malangope 3 หลายเดือนก่อน +1

    I want to code in vue but felt i needed to go the react way because of its popularity and React native for mobile apps.

    • @LachlanMiller
      @LachlanMiller  3 หลายเดือนก่อน

      This is fair, I use a lot of react too due to job market

  • @Vietnamkid1993
    @Vietnamkid1993 9 หลายเดือนก่อน

    Good video but was there a reason for using watchEffect? All that could’ve been accomplished with shallowRef and computed.

    • @LachlanMiller
      @LachlanMiller  9 หลายเดือนก่อน

      I was trying to make the Vue and React examples as similar as possible, useEffect and watchEffect are quite similar.

  • @lavglidesgh6266
    @lavglidesgh6266 6 หลายเดือนก่อน +1

    Where do I start from, I'm studying both and if you can point to any video to start. I do pure html, css and javascript

    • @LachlanMiller
      @LachlanMiller  6 หลายเดือนก่อน

      Good question. I knew some coding already (C, Ruby etc) when I came to frontend. I learned HTML/JS/CSS and Vue all at the same time, it was a bit confusing (which is Vue? which is regular JS?)
      I think it's fine to start with a framework like Vue/React, just learn HTML/JS as you go. Main thing is to build something!

    • @lavglidesgh6266
      @lavglidesgh6266 6 หลายเดือนก่อน

      @@LachlanMiller thanks buddy

  • @pisyaone6635
    @pisyaone6635 หลายเดือนก่อน

    How are you managing to run Vue and React at the same time? Are you utilizing micro-frontend technology on this example?

    • @LachlanMiller
      @LachlanMiller  หลายเดือนก่อน

      No, I just import them both and mount the apps on different DOM elements. Eg

  • @Ayvengo21
    @Ayvengo21 6 วันที่ผ่านมา

    It's a bit unclear and i haven't see some good explanation how does vue know that there was a change in some of the ref variables. Like is it some setInterval that check it or some hidden setter function?

    • @LachlanMiller
      @LachlanMiller  5 วันที่ผ่านมา +1

      It creates a map of all dependencies for each reactive effect. See th-cam.com/video/HzhcXVFEiVY/w-d-xo.html or lachlan-miller.me/articles/vue-3-reactivity-from-scratch

  • @mahadyounis8734
    @mahadyounis8734 2 หลายเดือนก่อน

    Great

  • @MichaelScharf
    @MichaelScharf 5 หลายเดือนก่อน

    That’s why I use MobX with react.

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน

      Yeah for sure, love MobX + React combo

  • @JulienMayer-fh7wj
    @JulienMayer-fh7wj หลายเดือนก่อน

    Great video but I think your explanation at 9:40 may cause someone to think React does not return "new" JSX

  • @SXsoft99
    @SXsoft99 3 หลายเดือนก่อน

    One of the things that i find better in Vue over react is when you add conditions and other things like this
    The directives make the code easier to read when you have something more complex than a counter
    I have meet a lot of devs that comed from different backgrounds and they first used react and were apprehensive at the code but when using vue they felt all the pain points go away

  • @FavourAkpasi
    @FavourAkpasi หลายเดือนก่อน

    a lot of react slander on the CS. i am still a react fan. but this video is a good comparison between both.

    • @LachlanMiller
      @LachlanMiller  หลายเดือนก่อน

      I think they’re both great!

  • @kalakalan772
    @kalakalan772 5 หลายเดือนก่อน

    Do you appreciate: Vue3.js+Django+Django Rest API???

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน

      I have not done django before but python is pretty cool

  • @ControlProblem
    @ControlProblem 5 หลายเดือนก่อน +1

    At 4:50, you click the Vue button twice but the datetime only updated once. Did you click twice in one second? Or was it not supposed to update twice?

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน +1

      I think I clicked twice in one second. I just tested it out, it does indeed update the timestamp as expected. Watching this back, the time between clicks feels slow, but it must be *just* within one second.

    • @ControlProblem
      @ControlProblem 5 หลายเดือนก่อน

      @@LachlanMiller Thank you for clarifying.

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน

      @@ControlProblem thank YOU for watching!

    • @LachlanMiller
      @LachlanMiller  5 หลายเดือนก่อน

      @@ControlProblem thank you for watching!

  • @aminnairidev
    @aminnairidev 8 หลายเดือนก่อน +1

    I see a lot of comments here saying "1 of million reason why Vue is better than React" or "I switch to React because of the ecosystem". I'm reality you can do exactly the same thing with both there is no functional differences. Only a matter of programming paradigm. If you like mutations, what most of us probably grew with classes and method then Vue will make most sense. If you are like me and have discovered and loved functional programming then React will make most sense. But you can't say I chose Vue because it has more tools because virtually anything Vue has can exist in React it is just simply that it hasn't been written yet.

    • @LachlanMiller
      @LachlanMiller  8 หลายเดือนก่อน +1

      I agree, both are fine. You can work in a mostly functional paradigm in Vue if that's your thing too. It doesn't really matter at the end of the day, both frameworks are more than capable.

  • @aleks5652
    @aleks5652 3 หลายเดือนก่อน

    I think you made a wrong comparison, because in vue you used ref, but in react - useState. That's quite different things.

    • @LachlanMiller
      @LachlanMiller  3 หลายเดือนก่อน

      What would you recommend? I think this is the idiomatic way to handle state in both frameworks.

  • @xtraszone
    @xtraszone 9 หลายเดือนก่อน +3

    For those thing vue code in this example is larger in size..
    Actually vue code is smaller here because in react - count is incremented inline but vue, count is incremented in separate function which is creating illusion that code is larger in size. Add
    Also vue 3 apps are much much faster than react and angular.

    • @LachlanMiller
      @LachlanMiller  9 หลายเดือนก่อน +2

      Personally I don't care too much about a few extra lines of code. I DO care about performance, though. Fully optimized Vue and React apps are roughly the same in my experience, but optimizing React code is a bit more effort (as explained in this video).

  • @carlcarlinn7367
    @carlcarlinn7367 4 หลายเดือนก่อน

    Opt-in is always better than opt-out.

  • @DmitriiBaranov-ib3kf
    @DmitriiBaranov-ib3kf 6 วันที่ผ่านมา

    At least four new allocations on every count update in this React component. And zero in Vue

    • @LachlanMiller
      @LachlanMiller  5 วันที่ผ่านมา +1

      No doubt there is room for optimisation, just an example to illustrate the difference in reactivity systems!

    • @DmitriiBaranov-ib3kf
      @DmitriiBaranov-ib3kf วันที่ผ่านมา

      @@LachlanMiller I agree, but there seems to be no room for optimization for Vue reactivity system. Besides, React won't go to this optimization room, so to say, since it'd be a whole paradigm shift. React is based on a flawed immutability-first approach, which causes tons of allocations and loops (both in spreads and dependency array comparisons)

  • @ColinRichardson
    @ColinRichardson 8 หลายเดือนก่อน

    Thumbnail not comparable.

  • @hassamulhaq7762
    @hassamulhaq7762 10 หลายเดือนก่อน +2

    you highlights the real power of Vue, i feel better to code in Vue.

    • @LachlanMiller
      @LachlanMiller  10 หลายเดือนก่อน +1

      I feel great coding in Vue - especially with script setup and TS.

  • @oinn6216
    @oinn6216 3 หลายเดือนก่อน

    So Vue2 was inspired by Angular 1.x and Vue3 inspired by React niiiiice 😂

    • @LachlanMiller
      @LachlanMiller  3 หลายเดือนก่อน

      I think it's great how all the frameworks are inspiring each other!

    • @metalcorewitchkhousovitch5774
      @metalcorewitchkhousovitch5774 3 หลายเดือนก่อน

      And Vue Vapor is inspired by Solid.js)

  • @xqsit94
    @xqsit94 4 หลายเดือนก่อน +1

    In my opinion Vue 3 > React > Vue 2

    • @LachlanMiller
      @LachlanMiller  4 หลายเดือนก่อน

      With script setup in the Composition API Vue 3 certainly feels very different to Vue 2. I am pretty happy working in both frameworks, I think Vue has some nice ergonomics, React has some neat things on the horizon with the announcement of React 19.

  • @dasten123
    @dasten123 3 หลายเดือนก่อน +1

    I really can't understand why ANYONE would choose React over Vue. This looks embarrassingly inefficient and stupid!

    • @LachlanMiller
      @LachlanMiller  3 หลายเดือนก่อน +1

      I actually like both, I think there are good reasons to go with either!

    • @mke7605
      @mke7605 หลายเดือนก่อน

      It’s the industry standard.

  • @mikehurtado4772
    @mikehurtado4772 7 หลายเดือนก่อน +1

    Vue is better

  • @kishirisu1268
    @kishirisu1268 4 หลายเดือนก่อน +1

    All simple - if you planning to work for third world - learn Vue, if your clients in USA and EU - learn React. Also do you know any native apps on Vue or 3D rendering on Vue? All that made with React, Vue is for websites only. React is the simplest lib, even monkey can learn it, have no idea how anyone can have problems learning it.

    • @LachlanMiller
      @LachlanMiller  4 หลายเดือนก่อน

      React is pretty small and simple but once you add all the other libraries it gets pretty complex
      Not sure on the Vue/React third world vs USA thing, I don't live in the USA but plenty of both in my country, def more React, I'd say React in general seems popular everywhere.

    • @buddh4r
      @buddh4r 3 หลายเดือนก่อน +1

      Toxic React dev who is afraid of learning new things detected.

    • @mke7605
      @mke7605 หลายเดือนก่อน

      @@buddh4rnot really. It’s just a fact that react is just everywhere. I personally prefer svelte, but now using react because that’s what everybody is using in the industry.

    • @buddh4r
      @buddh4r หลายเดือนก่อน

      @@mke7605 I do not doubt that there are more react jobs out there, its rather the wording which makes me believe what I said... I say learn both and use the better tool for new projects if you can choose.

  • @MilanDrazic
    @MilanDrazic 3 หลายเดือนก่อน +1

    Vue code is so dummy. Tomorrow you looking code and don't know what code is doing.
    Anti-javascript

    • @LachlanMiller
      @LachlanMiller  3 หลายเดือนก่อน

      Any examples of code you think is hard to understand in Vue?

  • @edd6927
    @edd6927 9 หลายเดือนก่อน

    This is very misleading, you approach your comparison and explanation from a React mindset where you are used to “infinite rendering react loop”.
    This concept doesn’t exist in other frameworks (front or backend) where code is executed only once and you must “opt in” (to put it in your terms), this is something the react team had to purposely address in their new documentation because it’s not intuitive to new comers and you have to adopt this react way of thinking.
    Thank god there’s alternatives (not just Vue), much better than react

    • @LachlanMiller
      @LachlanMiller  9 หลายเดือนก่อน +1

      Hi, thanks for the detailed comment. I am not sure what you mean by misleading - can you explain more about what you mean regarding "infinite rendering react loop"?

  • @phojie6868
    @phojie6868 9 หลายเดือนก่อน +2

    1 of 1milllion reason why you choose vue over react, not new