Roadmap › Vue.js 3 (with Pinia, Vue Router & Nuxt basics) › Module: Quality and Performance
Lessons in this course (17)
15. Performance optimisation
Advanced★ Must knowLesson 15 of 17
- Lazy-load routes and heavy components (
() => import(),defineAsyncComponent). - Stable
:keys; avoidv-if+v-fortogether; preferv-showfor frequent toggles. - Virtual scrolling for long lists (vue-virtual-scroller, TanStack Virtual).
shallowRef/shallowReactive/markRawfor large immutable data or third-party instances.v-once/v-memofor static or rarely changing subtrees.- Computed properties instead of methods in templates (cached).
- Keep props stable so child components don't re-render unnecessarily (Vue already skips children whose props didn't change).
KeepAlivefor tabs to avoid re-creating components.- SSR/SSG with Nuxt for first paint and SEO; lazy hydration (3.5).
- Analyse bundles (
rollup-plugin-visualizer), tree-shake imports, production builds.