Which Is Better? Vue CLI or Vite? Options API vs Composition API? My Vue Recommendations...

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 115

  • @ProgramWithErik
    @ProgramWithErik  3 года назад +5

    Want to learn more about Vue? I have a six module course on it here! bit.ly/2OETt0M

    • @MrAndi1281
      @MrAndi1281 2 года назад

      sometimes i am sad that i only can give one Like to a video :(....thanks for this, awesome video!!

    • @newage9670
      @newage9670 2 года назад

      "than", not "then". One of the most common mistake in English.

  • @namaefumei
    @namaefumei 2 года назад +12

    Thanks for the video.
    Setup:
    - Vue 3
    - Vite
    - Composition API with Setup Script
    - Vue Router(Next)
    - Cypress , @testing-library/vue
    - Vitesse (starter template)
    - No component library
    - Volar VSCode Extension

  • @OzoneGrif
    @OzoneGrif 2 года назад +9

    I use the same stack in my latest projects; it's a very good stack!
    I'm on Quasar tho, building components is time consuming and Quasar is really good.

  • @lithium820
    @lithium820 3 года назад +22

    im still bummed that vuetify is still not actually released for vue3, only as nightlies...

    • @FNXTproductionz
      @FNXTproductionz 3 года назад +2

      I think a huge mistake that was made early on, is that instead of providing quick support for Vue3 and refactor later, these projects opted for huge code rewrites. I feel like this decision was so unhealthy for the community. On the other hand HeadlessUI from Tailwind was created only for Vue3 in mind and the difference between React and Vue(only 3) weekly download is huuuuge.

  • @Lucas-mu5no
    @Lucas-mu5no 2 года назад +1

    For now, I'd always recommend Vue 3 + Composition API + TS

  • @allanchavez3641
    @allanchavez3641 Год назад

    I was confuuuused before this video, but you answered my exact questions. Such a great video, thank you!

  • @zimpricecheck
    @zimpricecheck 3 года назад +6

    I use the same tools except testing. I only do small projects and feel having a full testing stack is not necessary.

  • @emongtindero
    @emongtindero 3 года назад

    My favorite channel for Vue

  • @z4ckfytc777
    @z4ckfytc777 2 года назад

    Thank you for guiding me into the best Vue stack!

  • @BhargavaMan
    @BhargavaMan 2 года назад +1

    Congrats on the 100K, Erik!

  • @JohannGarrido
    @JohannGarrido 2 года назад +3

    I really prefer the idea of just using a plain css theme like BulmaCSS for styling. Having a lot of classes in my elements for just styling/layout purposes is not my way. Because it's always a nightmare to align anything to proposed designs (including responsive), UI frameworks aren't so flexible in that aspect.

  • @j4nch
    @j4nch 2 года назад +3

    I'm "happy" to see that you recommend none of quasar/vuetify for the UI Library since I find a bit to heavy. Still, I'm curious, I'm quite often limited when I need some tailwind component with a bit of logic(like date picker), how do you handle this?

  • @serosgb
    @serosgb 3 года назад +2

    This is a great video! A lot of things have evolved.

  • @martinfinch5011
    @martinfinch5011 2 года назад

    Great video as always

  • @bellaluz383
    @bellaluz383 Год назад

    Great video! I came upon this when I was planning on the set up of my second vue 3 app. The first one I went with vite over vue-cli but I was wondering how you handle unit testing, because vite depends on Vitest, does it not? I've had some major issues with Vitest and testing-library/vue. They don't seem to play nice. Do you have a video on just setting up unit testing for vue 3?

    • @bellaluz383
      @bellaluz383 Год назад

      Just found it, ruclips.net/video/FJRuG85tXV0/видео.html

  • @Josehernandezl
    @Josehernandezl 2 года назад

    Wow Erick really amazin video, thanks for sharing

  • @psybitcoin
    @psybitcoin 2 года назад +1

    Can you do a video on Clean Architecture (Uncle Bob) with Vue/Nuxt?

  • @antonbilichenko1312
    @antonbilichenko1312 3 года назад

    Thanks for the video.
    Looks like it's time to update the knowledge

  • @bakhtiyor_sulaymonov
    @bakhtiyor_sulaymonov 2 года назад

    Thanks for the recommendations

  • @LucTemetNosce
    @LucTemetNosce 3 года назад

    Always great up to date content. Thanks.

  • @aleksandarstevanovic5854
    @aleksandarstevanovic5854 3 года назад +15

    for me the options API is just better looking, i hate seeing methods to be large as can setup be... also a dealbreaker for me in Vue CLI is no server side rendering, and nuxt 3 is still beta, so for now nuxt using vue 2 is my way, but sooner or later i will need to update my stack

    • @kissu_io
      @kissu_io 3 года назад +4

      Vite-SSG (available with Vitesse) is a good-enough alternative if you still want to work with Vue3.
      Also, if your setup is super long, it's probably lacking some composables/structure. At the end, you have more freedom but you need to use it wisely because Options API can be pretty messy too (it is more messy actually).

    • @samuelmorkbednarzkepler
      @samuelmorkbednarzkepler 2 года назад +6

      "methods" aren't any larger in script setup than in options API though? Also the code in total is almost always going to be much smaller in script setup than in options API. So, im just not sure I see what you're saying

    • @blank4157
      @blank4157 2 года назад +2

      composition API offers better DX imo, tried and play tested with options API in vue 3 and the DX still the same as before.
      Even in vue 2 I prefer composition API due to better DX.

  • @caiovinicius7871
    @caiovinicius7871 3 года назад

    Amazing content, ty Erik!

  • @axbe_
    @axbe_ 3 года назад +1

    Wow. Great video! Very good recommendations, even for newbie Vue devs. Your opinion on this stack seems to be built on a lot of experience. Thank you for sharing this.

  • @briankgarland
    @briankgarland 2 года назад

    Newbie question: What's better....this recommended stack or just going with Nuxt 3?
    Yes, I know that's a rather broad question with tons of "well that depends" caveats, so don't flame me too bad.

  • @chukwumaifeanyi4083
    @chukwumaifeanyi4083 3 года назад

    Nice work Erik. This is great info 👌

  • @dan_le_brown
    @dan_le_brown 2 года назад

    Eric, the first thing that came to my mind as I played this video was the soundtrack you used. Reminds me of Veritasium🥹

  • @gtanmoy
    @gtanmoy 2 года назад

    Please guide how to setup PWA using VITE with VUE.

  • @jacobschmidt4961
    @jacobschmidt4961 3 года назад +1

    I really enjoyed giving Vite a try, but I came across an issue where the hot reload did not work. So I had to manually restart Vite in the console anytime I made a change, which is a deal-breaker for me.

  • @xiuChang
    @xiuChang 2 года назад

    thank you Erik,it's helpful.

  • @salma969-q2e
    @salma969-q2e Год назад

    thannks

  • @JohnGodwin777
    @JohnGodwin777 3 года назад

    Perfect timing

  • @yuriybondaruyk1145
    @yuriybondaruyk1145 3 года назад +1

    Thanks)) To much a new info) I have still used V2))

  • @danielbuch1301
    @danielbuch1301 3 года назад

    Nice video. Would really be interested in your oppion regarding Nuxt. Is it worth the extra setup and dependencies?

    • @kissu_io
      @kissu_io 3 года назад

      It's probably not stable enough (yet), but coming soon!

  • @benjaminkieper568
    @benjaminkieper568 2 года назад

    Hi, thank you! What about ts vs. js in relation to vue?

    • @ProgramWithErik
      @ProgramWithErik  2 года назад

      I use TS all the time in Vue 3, that's the way to go honestly. The whole industry is going that way.

  • @Remmenth
    @Remmenth 3 года назад

    What about styling? Do you prefer CSS/SCSS, or maybe styled-components or something else?

    • @ProgramWithErik
      @ProgramWithErik  3 года назад

      SCSS

    • @kissu_io
      @kissu_io 3 года назад

      Vanilla Tailwind is still the best IMO, no need for more.

    • @Remmenth
      @Remmenth 3 года назад

      I'm not a fan of Tailwind, since it is based on CSS classes, and there is virtually no control over what you can type there. I personally loved the way that material-ui in React did a Box component that allows for passing margins and paddings as props. Also things like display: flex, etc. Typed propes have the adventage that I know my options there (like 'display' union type tells me that it accepts 'block', 'flex', etc.) CSS classes on the other hand, are not typed, so you can type there the biggest nonsense and it won't tell you it's wrong. I was hoping that there is a similar way of doing that in Vue, but looks like styled-components are the only option to achieve that (I'm not counting passing props to 'style' binding, because that is savage).

  • @edenassos
    @edenassos 3 года назад

    Those slides look great, did you design them or are they a template?

  • @cwinter90
    @cwinter90 3 года назад +1

    Vuetify not being ready is why I haven't switched to Vue 3 yet. Big bummer.

    • @kissu_io
      @kissu_io 3 года назад +1

      TailwindCSS

  • @fpigeonjr
    @fpigeonjr 2 года назад

    🎉Great video Erik! Helps me keep up to date with the Vue ecosystem. Would you recommend `vitetest` for vite-based projects? Thanks for sharing these.

  • @JustBCWi
    @JustBCWi 2 года назад

    So, what if I just started with Vue 3 vanilla and want to migrate to any of these? I'm new when it comes to JavaScript frameworks, but not new when it comes to programming (just old).

  • @beta82
    @beta82 Год назад

    What about nuxt?

  • @Rivederchee
    @Rivederchee 3 года назад

    Great video Erik, I think by accident I am the first one to have watched the whole thing :D

  • @JamesBaddiley
    @JamesBaddiley 3 года назад

    Hi Eric - where do you think NUXT fits in all this?

    • @kissu_io
      @kissu_io 3 года назад

      Nuxt is still in beta, will probably be dope once totally finalized and production-ready, especially since it will just use all of what is listed in this video, on top of SSR + QoL features baked-in.

    • @JamesBaddiley
      @JamesBaddiley 3 года назад

      @@kissu_io Yes Nuxt 3 is in Beta, but you can still use Nuxt 2. I was just curious why Eric didn't mention it in the video, and what his thoughts are on it.

    • @hhh0118
      @hhh0118 2 года назад

      @@JamesBaddiley Nuxt 2 does not support Vue 3, and as he mentioned at the start of the video his recommendations are based on Vue 3.

  • @DevlogBill
    @DevlogBill 2 года назад

    Hi Erik, do you know if you can make mobile apps using Vue? Or is there anything in the works for creating mobile apps using Vue? Lastly, I am shopping around for a library and I am deciding whether I should choose Vue or React. What makes Vue user friendly for new developers. I have only been learning JavaScript HTML and CSS now for 4 months and feel ready to learn a library. I could strongly use your guidance, thank you.

  • @cesswhite
    @cesswhite 3 года назад

    Thank you!

  • @rrd_webmania
    @rrd_webmania 3 года назад

    Exactly the stack what I use :)

  • @giridhart
    @giridhart 3 года назад

    What vscode theme for coloring are you using

  • @allanchua9394
    @allanchua9394 2 года назад

    Hey Erik, love your videos man! Keep them up! Had a Telegram conversation with Evan You yesterday and he recommended naive-ui for vue 3. Would love to hear your thoughts about it

  • @LukenSkyne
    @LukenSkyne 3 года назад

    script setup gang ✌🏻

  • @ГенаПетров-н5ы
    @ГенаПетров-н5ы 2 года назад

    Can u check solidjs framework?

    • @ProgramWithErik
      @ProgramWithErik  2 года назад

      I just chatted with the creator on Twitter, I want to get him on after the hollidays to show me!

  • @justgrumpy
    @justgrumpy 2 года назад

    Do you know of any "good" libraries that wrap MSAL and work well with Vue 3? By the way, I've been using script setup and like it a lot. Thanks for all the other recommendations.

  • @nghbrhood6848
    @nghbrhood6848 3 года назад +1

    So helpful! Quick question, if someone were to start learning Vue 3, and they got a job at a company that has existing Vue 2 projects, would they be able to understand and maintain them?

    • @kissu_io
      @kissu_io 3 года назад +2

      Options API and Composition API is not the same. Meanwhile, you can totally use Options API with Vue3. IMO, learning Options API first is still the way to go because it's easier.

    • @blank4157
      @blank4157 2 года назад

      And you can use composition API in vue 2 with composition API package, maintained by vue team.

  • @yatsuk
    @yatsuk 2 года назад +2

    I did not try Vue3 yet, so it's difficult to say is faster or not. But I can say that according to the documentation looks like the new composition API requires writing more code to achieve the same result and I definitely do not like that.

  • @marcosmoralesrodrigo9963
    @marcosmoralesrodrigo9963 3 года назад +1

    Awesome video! I'm glad I'm using most of the stuff you're recommending, it makes me feel good, haha :)

  • @RR-et6zp
    @RR-et6zp 2 года назад

    why not just Nuxt?

  • @YarkiiYa
    @YarkiiYa 2 года назад

    thaaaaaaaaaaaaaaaaaaanks!!!

  • @jenstornell
    @jenstornell 3 года назад

    I don't think you are correct. Vuex is the recommended state management tool for Vue. Do you have a source that says that the crew recommends Pinia instead?

    • @ProgramWithErik
      @ProgramWithErik  2 года назад +1

      github.com/vuejs/rfcs/discussions/270

    • @ProgramWithErik
      @ProgramWithErik  2 года назад

      You can use both, but Pinia is becoming more of an easier alternative for it.

    • @jenstornell
      @jenstornell 2 года назад

      By reading about it I feel like they now go in both directions at the same time. My guess is that they will merge them back into Vuex in the end. We will see. You channel is great Erik. Only thumbs up from me. 👍

  • @XRENDERMAN
    @XRENDERMAN 2 года назад

    So, I'm wathcing this from 2022, and Nuxt is still in RC so I still can't migrate to Vue3 :)

  • @mohamedkunle528
    @mohamedkunle528 2 года назад

    nice , but iam new to vite so can someone show me how to emit inside a function , when you are using cli you can say 'this' , but in vite it doesn't work.

  • @geoffreylee1780
    @geoffreylee1780 2 года назад

    Eh... How about nuxt?

    • @ProgramWithErik
      @ProgramWithErik  2 года назад +2

      Once it's out of alpha/beta, I'll look at it again. But right now, it's not quite ready. I do like Vue 2 with Nuxt bridge though,

  • @suman-majhi
    @suman-majhi 3 года назад +2

    Nuxt 3 still not release
    so its vue 2

    • @kissu_io
      @kissu_io 3 года назад

      Nuxt3 is publicly available, even if still in beta.

    • @suman-majhi
      @suman-majhi 3 года назад +1

      I mean LTS, without LTS and stable version, we cant use it in corporate

  • @offgridvince
    @offgridvince 2 года назад +1

    Nuxt...

  • @Steve-Richter
    @Steve-Richter Год назад +1

    vue 2 was so easy to work with. Vue 3 appears brutally complex and disorganized.

  • @enriquesneffels3053
    @enriquesneffels3053 2 года назад

    Which is better? React of course!; which is nicer to work with? Svelte of course! :D

  • @rajikkali2381
    @rajikkali2381 2 года назад

    Sound only out of 1 ear or just me?

  • @PenguinCrayon269
    @PenguinCrayon269 2 года назад +1

    anyone recognize the Veritasium music? :v

  • @AceixSmart
    @AceixSmart 2 года назад

    I love Vue and Vue 3, but bro started with "latest and greatest" lol

  • @madsteeez
    @madsteeez 3 года назад +2

    Why is noone using class based syntax API? Makes refactoring with webstorm a charm.

    • @kissu_io
      @kissu_io 3 года назад

      Because most of the people prefer less boilerplate and use VScode.

    • @madsteeez
      @madsteeez 3 года назад

      @@kissu_io ok.. what boilerplate though? Composition API has more boilerplate than class based syntax it seems to me..

    • @akasection
      @akasection 2 года назад +2

      this might be my opinion (or just small, short-sighted conclusion), but I can say, at least in my team reaaally don't like bringing class system into their javascript code. When I ask why, they said that it feels rigid and imposing (in addition, it gave them vibes of coding in university back then; and they don't like it for some reason).

    • @madsteeez
      @madsteeez 2 года назад +2

      @@akasection ok, that might be it. JS devs not being too fond of classes in general 🤷🏼‍♂️

    • @blank4157
      @blank4157 2 года назад +1

      Tbh, I feel like classes are almost redundant in JS when you can create and work with objects directly as opposed to languages like C#, Java, C++ etc. where you have to instantiate classes in order to work with objects.

  • @mukostenko
    @mukostenko 2 года назад +2

    I would change title to ..best vue stack for pet projects and landings. Or list of most hype technologies.
    vue-test-utils - has a lot of problems
    vite - also doesn't ready for big production
    what about ssr with vue 3?
    file based routing - in my opinion the worst thing that exists in nuxt
    script step brings too much magic
    tailwind - reinvention of inline css with style attribute

    • @ProgramWithErik
      @ProgramWithErik  2 года назад

      It's not for everyone. This is good concerns. Vite though is production ready. Lots of apps are using it now. And SSR exists in Nuxt 3 v3.nuxtjs.org/

  • @timonbandit
    @timonbandit Год назад

    The worst about composition API - it's hard to read.
    Every developer make his own structure and instead of easy-reading on options API components - you have to read spaghetti code.

    • @ProgramWithErik
      @ProgramWithErik  Год назад

      You have to be disciplined when writing the composition API for sure.

    • @timonbandit
      @timonbandit Год назад

      @@ProgramWithErik Me - yes 🙂What's about other developers in the team ? :-)
      If some framework/language allow you to do sh*t - be sure you'll see it everywhere ;-) I can't compare or select which API is better - Options or Composition - They're for different purposes :-)

  • @feimberg
    @feimberg 2 года назад +4

    I disagree basically with all recommendations 😂

  • @antifa_communist
    @antifa_communist 11 месяцев назад

    I don't know why you would even consider using Vue2 or even mention it. Vue3 is better than Vue2 in every way. Same with Vite and VueCLI. You don't even need to mention it, it's obvious.

  • @russstephanson6987
    @russstephanson6987 3 года назад +1

    The composition API is the future. Libraries and frameworks that don't build on the composition API are going to go the way of the dinosaurs. Either VUE keeps pushing forward progressively or it will become another dead development platform. Angular is struggling for this exact reason.. If you don't progress in today's day and age and tech leaves you behind... Nortel, Nokia, Blackberry...
    2 Years ago Quasar was by far the most complete front-end development platform for Vue... Unfortunately it is developed by only 1 person and it is falling far behind despite being one of the first to incorporate VUE3....