And, more importantly... how to avoid them
Lead Instructor @ Vue School
Full Stack developer (10 + years)
Husband and Father
presentation Icons from fontawesome.com
<li 
  v-for="(item, index) in items" 
  :key="index"
>...</li>What's wrong with this? 🤔
Bug Manifests Under 2 Conditions
It's not just for loops!
const cookiesAccepted = computed(()=> 
  localStorage.getItem("cookiesAccepted")
)What's wrong with this? 🤔
const msg = "Hello world";
const cookiesAccepted = computed(()=> msg)This is more obvious
Often see this with browser API's:
VueUse
Which function do you find yourself using the most?
I see all kinds of issues
useRouter().push("/")What's wrong with this? 🤔
(in the context of Nuxt 3 app)
navigateTo("/")This is the Nuxt Standard Way
Lines 111 - 206
https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/router.ts
🔥 Free
https://vueschool.io/courses/common-vue-js-mistakes-and-how-to-avoid-them
danielkelly_io
I'll tweet out the slides and the codebase after this
Go code awesome things!
(with Nuxt 😉)