The new Vue 3.4 feature NOBODY talks about… (+ raffle)

Поділитися
Вставка
  • Опубліковано 9 лип 2024
  • 👀 Vue 3.4 came out and people talk about all the amazing new features, whether it be the stable defineModel macro or the v-bind shorthand. But one key point is often missed out by the people - and it is related to SSR and hydration errors!
    Key points:
    ‼️ How hydration errors and mismatches are easier to debug now
    📓 One case how hydration mismatches can be provoked
    ✨How the ecosystem evolves
    🎁 A raffle for ‪@VuejsAmsterdam‬
    ---
    To win one ‪@VuejsAmsterdam‬ ticket, comment with why you'd love to join the conference and what was the most amazing thing you've built with Vue and/or Nuxt so far.
    Winners will be picked randomly and announced in the next video!
    ---
    Links:
    🔗Vue 3.4 announcement blog post blog.vuejs.org/posts/vue-3-4
    🔗Hydration error blog post: www.lichter.io/articles/vue-h...
    🔗Nuxt issue the demo app code came from (+solution) github.com/nuxt/nuxt/issues/2...
    🔗Demo App github.com/manniL/alexander-l...
    🔗 Nuxt 3.9 announcement blog post nuxt.com/blog/v3-9
    🔗 useId PR for Nuxt github.com/nuxt/nuxt/pull/23368
    🔗 useId RFC for Vue github.com/vuejs/rfcs/discuss...
    🔗 Vue.js Amsterdam vuejs.amsterdam
    Don't forget to hit that "Subscribe" button, ring the notification bell and give a thumbs up!
    🌐 Connect further:
    Website: www.lichter.io
    Twitter/X: / thealexlichter
    Twitch: / thealexlichter
    Chapters:
    00:00 Intro
    00:42 Vue 3.4 features we will not talk about today
    01:00 Improved Hydration Errors
    01:39 Demo App and Issue
    03:33 Reason for mismatches in the demo case
    04:39 How it looks in Vue 3.4
    06:04 useId
    08:30 Summary + ‪@VuejsAmsterdam‬
  • Наука та технологія

КОМЕНТАРІ • 66

  • @TheAlexLichter
    @TheAlexLichter  5 місяців тому +12

    Who also knows this error message too well? 👀

  • @ProgramWithErik
    @ProgramWithErik 5 місяців тому +10

    Fire content Alex! Can't wait until Vue 3.5!

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      Thank you Erik 💚🙏
      Or the next Nuxt minor 👀✨

  • @michaelpumo83
    @michaelpumo83 5 місяців тому +3

    Fantastic video and thanks for talking about this feature...as you say, probably not a feature most people will be talking about but ABSOLUTELY one feature that every Vue developer will benefit from. The continual improvement for DX is what sets Vue and Nuxt apart from other frameworks in my mind.
    I'd love to go to Vue Amsterdam also and see all the great talks - hopefully even get to say hi to yourself and just be there to soak in the atmosphere. I'm not a library author, speaker or dev rel but I do preach for Vue at any moment I can. Since being a freelancer / consultant, I've used Vue / Nuxt on virtually every project since (the last 5 years...my gosh) with great success. I even helped Greggs (the biggest UK fast-food bakery) keep their web apps in Vue by assisting with a huge upgrade process to Nuxt 3. It was painful as it was still in RC at the time...and I was helping file many bugs along the way but it was fun and rewarding work.
    Anyway, all that said, looking forward to the next content! Keep up the good work 👏

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      Thank you and congrats to the ticket 🙌

    • @Tarabass
      @Tarabass 5 місяців тому +1

      Congratulations Michael. Have fun in Amsterdam. I definitely wanted to go and almost won. Maybe next time, only one can win 😏😊

  • @SKTTWkartrider
    @SKTTWkartrider 5 місяців тому +1

    Great job, Alex! This video really answers my doubts about the hydration errors/warnings. I used to ignore those messages as they seemed not so critical. Now I learn more about them.

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому +1

      Thank you 🙏 Yeah, ignoring them is definitely not advisable, but (especially since 3.4) making a clear distinction between "id"-related (usually no problem) and "other" (big issues) hydration mismatch warnings is important 👌

  • @luc122c
    @luc122c 5 місяців тому +2

    I’ve just had a look at the Vue Amsterdam conference site and it looks amazing; I would definitely love to go. It would be great to meet some of the people I’ve talked to in PR’s and Discord for real life!
    My favourite thing I built in Nuxt was an internal dashboard for my last company. It was super easy to configure, update and change things around which made updates much quicker. The speed at which the Nuxt team ships code is astounding 🚀

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому +1

      Hey! Thanks a lot for your comment - unfortunately luck was not on your site this time.

  • @user-ld4eq4go8e
    @user-ld4eq4go8e 5 місяців тому

    In my particular case, I was so lucky to start my career as Frontend a few years ago (7) and when I started learning Vue 2 with the great Ignacio Anaya, it was love at first sight. I loved the way of working and since then I have been lucky enough to continue working with my beloved Vue, and following this great community that has shown me all these years that it is exemplary and unmatched within the entire JS ecosystem.
    I really appreciate people like you who spread content and bring this great ecosystem closer to people to show that programming can be fun and rewarding.
    That's why I was about to take out (in the end not for personal reasons) in the last Black Friday the ticket for Vue Amsterdam to meet in person all those great geniuses behind the software that has given me so many good times and to thank them for allowing my family and me to live creating amazing things with it!
    Mach weiter so, Alex, du hilfst mehr Menschen, als du denkst, du machst das grossartig!

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      Hey Daniel! Thanks a lot for sharing your story and the kind message! I'll definitely keep it going and continue dropping more (hopefully helpful) videos 🙏
      FYI: Unfortunately, you weren't the lucky one for the raffle

  • @nthcplayer4320
    @nthcplayer4320 5 місяців тому +1

    Thx for your video ! Very usefull as always :D I use a random number for my app into the 404 page, so it's very nice to see that is planned for vue 3.5 !

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому +1

      Glad it was helpful!
      Yes, looking forward to useId too 😁

  • @samculo1051
    @samculo1051 5 місяців тому +1

    Very useful videos. Short, not complicated, straight to the point. Just awesome!

  • @fabius-maximus
    @fabius-maximus 4 місяці тому +1

    Very useful! Thanks 🙏

  • @bippansingh6519
    @bippansingh6519 5 місяців тому

    I am migrating my project to nuxt 3, I have seen this error. Thanks for making a video on this. Your content is awesome

  • @Kedubs
    @Kedubs 5 місяців тому +1

    Looking forward to this - any idea when this will apply to Nuxt 3? I'm seeing vue@3.4.7 and it looks like it's 3.4.10? or am I crazy?

    • @dargmuesli
      @dargmuesli 5 місяців тому +1

      Any Vue usage starting with 3.4 should include this. Maybe you need to run an update of transitive dependencies?

    • @nested9301
      @nested9301 5 місяців тому +1

      NUXT 3 .9 IS vue 3.4 ready

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      As mentioned in the comments already, it is already the case! Nuxt does not pin the Vue version 😊

  • @tolgabeyazoglu536
    @tolgabeyazoglu536 5 місяців тому +1

    fine detail beautiful video

  • @alibahrami6810
    @alibahrami6810 5 місяців тому

    Dude, to prevent that double running same code on server and client, using process.server in a if statement is a good choice? (I myself don't think so 😜) . my problem is that I have a compasable, which I use useLocalStorage inside. and this is not present on the server, so I have to run it only on the client. how to do so? I think it's worth a video.
    And as always great content, great vibe! thanks!

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      If it should run only on the client, run it in `onMounted` 👌

  • @fortrackz
    @fortrackz 5 місяців тому

    Thanks!

  • @productdevbook
    @productdevbook 5 місяців тому

    Thank you

  • @DownthunderAu
    @DownthunderAu 5 місяців тому

    Great explanation and showcase, Alex. This will make tracking down hydration mismatches sooo much easier. :)
    P.S.: Anyone found a good workaround for browser extensions that change dom elements on the fly (ie. LastPass) which also cause mismatches?

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      You are welcome! 🙌
      Re LastPass/Extensions: I wish... 🙈
      Maybe automatically setting a lastpass ignore attribute on forms in dev mode could help?

  • @Andrey-il8rh
    @Andrey-il8rh 5 місяців тому

    Vue turns into Storybook, patch update every hour 😅

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому +2

      Honestly, I'm happy with the speed of releasing patches 🙌
      Better that way than waiting for weeks/months

    • @Andrey-il8rh
      @Andrey-il8rh 5 місяців тому +1

      @@TheAlexLichter yeah, it's hard to say which release cycle is better. I feel like once per 2 weeks is a sweet spot

  • @Andrey-il8rh
    @Andrey-il8rh 5 місяців тому

    Alex, the master of clickbait title 😂

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      Tiny bit 👀 But at least the thumbnail is a clear about the topic 😛

    • @Andrey-il8rh
      @Andrey-il8rh 5 місяців тому +1

      @@TheAlexLichter actually it was really hard to read from a phone, I only was able to distinguish what is written there on the laptop 🥸

    • @TheAlexLichter
      @TheAlexLichter  5 місяців тому

      Oh, fair point 🙈