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

Поділитися
Вставка
  • Опубліковано 23 лис 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.
  • Наука та технологія

КОМЕНТАРІ • 12

  • @dannjohnrem
    @dannjohnrem День тому

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

  • @luatthaivan6449
    @luatthaivan6449 7 місяців тому

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

  • @Figurum
    @Figurum 2 місяці тому

    awesome🎉

  • @apglazkov
    @apglazkov 3 години тому

    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" 🔥🐶🔥

  • @jored56
    @jored56 3 місяці тому

    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 Місяць тому

      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 6 місяців тому

    Totall basics. nothing interesting

    • @someoneelse5005
      @someoneelse5005 6 місяців тому +13

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

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

      @@someoneelse5005
      true af 🤣