vue-best-practices
Vue 3 best practices, common gotchas, and performance optimization.
Reactivity
- Accessing ref() values without .value in scripts → See ref-value-access
- Destructuring reactive() objects, losing reactivity → See reactive-destructuring
- Choosing between ref() and reactive() for state → See prefer-ref-over-reactive
- Accessing refs inside arrays and collections → See refs-in-collections-need-value
- Large objects or external library data overhead → See shallow-ref-for-performance
- Using nested refs in template expressions → See template-ref-unwrapping-top-level
- Comparing reactive objects with === operator → See reactivity-proxy-identity-hazard
- Library instances breaking in reactive state → See reactivity-markraw-for-non-reactive
- Expecting watchers to fire for each state change → See reactivity-same-tick-batching
- Integrating external state management libraries → See reactivity-external-state-integration
- Tracing unexpected re-renders and state updates → See reactivity-debugging-hooks
- Deriving state with watchEffect instead of computed → See reactivity-computed-over-watcheffect-mutations
More from uni-helper/skills
uni-app
Comprehensive skill reference for uni-app cross-platform development framework
1.1Kuni-helper
Comprehensive skill reference for uni-helper ecosystem - AI-powered development tools for uni-app
428vite
Vite next-generation frontend build tool with fast HMR and optimized builds. Use when configuring Vite, adding plugins, working with dev server, or building for production.
397vue
Vue.js progressive JavaScript framework. Use when building Vue components, working with reactivity (ref, reactive, computed, watch), or implementing Vue Composition API patterns.
388pinia
Pinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patterns in Vue apps.
363unocss
UnoCSS instant atomic CSS engine, superset of Tailwind CSS. Use when configuring UnoCSS, writing utility rules, shortcuts, or working with presets like Wind, Icons, Attributify.
346