Daniel Kelly
Common Mistakes in Vue.js and How to Avoid Them
#1about 1 minute
Why learning from common mistakes is practical
Making small mistakes can lead to big headaches, so learning from others' errors is a practical way to improve your own code.
#2about 9 minutes
Avoid using the index as a key in v-for loops
Using an array index as a key in `v-for` can cause unpredictable rendering bugs when the array order changes and child components have their own state.
#3about 5 minutes
Do not rely on non-reactive browser APIs
Computed properties and watchers will not update when depending on non-reactive browser APIs like localStorage or DOM element properties; use libraries like VueUse for reactive wrappers.
#4about 5 minutes
Prefer ref over reactive to avoid breaking reactivity
Reassigning a variable declared with `reactive()` breaks its reactivity, so it's recommended to use `ref()` instead for all data types to prevent subtle bugs.
#5about 6 minutes
Avoid mutating props directly in child components
Directly mutating props, including properties of object props, violates one-way data flow and can be solved by using `defineModel` for `v-model` or cloning the prop into local state.
#6about 2 minutes
Learn more with a free course and certification
A free View School course covers these mistakes and more, including prop drilling and cleaning up event listeners, and a certification is available to validate your skills.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
07:48 MIN
Navigating state management patterns and their trade-offs
Lessons learned from building a thriving Vue.js SaaS application
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:13 MIN
Exploring the core technologies behind Vue 3 reactivity
Under The Hood of Vue 3 Reactivity
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
13:26 MIN
Q&A on framework comparisons and advanced concepts
Securing Frontend Applications with Trusted Types
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
02:59 MIN
Understanding the core principles of reactivity
Under The Hood Of Vue 3 Reactivity
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
10:23 MIN
Reframing common complaints about JavaScript development
How to Stop Choosing JavaScript Frameworks and Start Living
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
04:19 MIN
Answering questions on reactivity and browser support
Under The Hood of Vue 3 Reactivity
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
01:38 MIN
Deciding when to use or avoid TypeScript in Vue
Vuejs and TypeScript- Working Together like Peanut Butter and Jelly
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
04:32 MIN
Introduction to JavaScript design patterns
10 must-know design patterns for JS Devs
Unlock Moments
Create a free account to watch a limited number of Moments each month.
Upgrade to PRO for unlimited access to the full archive.
Upgrade to PRO for unlimited access to the full archive.
You have an account? Log in
Featured Partners
Related Videos
Under The Hood of Vue 3 Reactivity
Marc Backes
Under The Hood Of Vue 3 Reactivity
Marc Backes
Lessons learned from building a thriving Vue.js SaaS application
Abdelrahman Awad
What the heck do "declarative" and "reactive" actually mean?
André Kovac
petite-vue - Progressively enhancing every application?
Alexander Lichter
Learning From My Side Project Mistakes
Jonathan Fielding
Bringing back reactivity in "reactive" frontend
Michał Moroz
Vuejs and TypeScript- Working Together like Peanut Butter and Jelly
Rob Richardson
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Speech Processing Solutions
Vienna, Austria
Intermediate
CSS
HTML
JavaScript
TypeScript

Head-on Solutions GmbH
Nürnberg, Germany
Junior
Intermediate
CSS
Jest
Vue.js



APRIORI - business solutions AG
Remote
Svelte
Vue.js
Microsoft Office
Continuous Integration




Zebresel - Deine Agentur für d igitale Medien.
GIT
HTML
Vue.js
Node.js