Common Mistakes in Vue js and How to Avoid Them - Daniel Kelly

Sdílet
Vložit
  • čas přidán 23. 11. 2023
  • Building apps with Vue is a delight, but there are some common gotchas you should look out for! In this talk, let’s take a look at some common mistakes that lead to bugs, wasted time, and frustration for Vue.js developers. Topics include: - the v-for key attribute, - replacing reactive state the wrong way - failing to clean up event listeners - watching arrays the wrong way - Unintentionally mutating props - Deconstructing reactive objects - Using composables in the wrong place - and more! Many of these mistakes you’ve probably been guilty of yourself (I know I have!). Learn strategies for avoiding the same mistake twice. If you’re lucky enough not to have made some of these, definitely learn from my own mistakes and the mistakes of others from the community.
  • Věda a technologie

Komentáře • 12

  • @dannjohnrem
    @dannjohnrem Před 2 dny

    Wow, you’re amazing! How can I be as incredible as you?

  • @apglazkov
    @apglazkov Před dnem

    20:37 - "Hydration mismatch" - even in a single file tutorial example 😅
    If a developer can make a mistake so easily, it means there is something wrong with the platform itself.
    Meanwhile, Vue.js developers still can't stop smiling in all their videos, feigning happiness 😂
    "This is fine" 🔥🐶🔥

  • @luatthaivan6449
    @luatthaivan6449 Před 7 měsíci

    is cloning the object will make some performance issues if the object is complex or have function properties ?

  • @Figurum
    @Figurum Před 2 měsíci

    awesome🎉

  • @jored56
    @jored56 Před 3 měsíci

    In that last mutating props example, wouldn't _data be initialized only once, so once u pass that object up to the parent (and the parent doesn't clone it), you'll end up still mutating the same object? 23:59

    • @praveshishere
      @praveshishere Před měsícem

      yes, _data would only be initialized once and in order to overcome that you would have to watch data prop and update _data correspondingly (which would also result in either losing all the changes child component made or patching those changes on the new data received from parent based on your design), when we emit _data to parent, if the parent has used a ref, it would be easily updated no issues with that, though I am not sure what would happen in case if was created using reactive (since I only use refs)

  • @najlepszyinformatyk1661
    @najlepszyinformatyk1661 Před 6 měsíci

    Totall basics. nothing interesting

    • @someoneelse5005
      @someoneelse5005 Před 6 měsíci +13

      I have no idea what you would expect from common mistakes in a video, they are common for a reason

    • @baraa7869
      @baraa7869 Před 5 měsíci +3

      @@someoneelse5005
      true af 🤣