Skip to main content

21 docs tagged with "vue"

View all tags

Composables — extracting logic into functions

Covers how to build composables that package state and logic for reuse. Explains the shape of return values and arguments, where to hand off cleanup of side effects, and the constraints on where they can be called, from how the implementation behaves.

Composables and server-side rendering — what breaks under SSR

Covers the ways composables break once placed in a setup that also renders on the server. Explains reading window at call time, side effects not confined to onMounted, and state in module scope leaking between requests, alongside the behaviour actually measured.

Nuxt basics — directory conventions and server APIs

Covers the foundations of Nuxt 4. Confirms the directory conventions under app/, routing decided by file name, applying layouts, and the file-name conventions and method narrowing in server/api, all from actual behaviour.

Pinia — defining and splitting stores

Covers Pinia, which shares state across components. Measures the difference between option and setup stores, why storeToRefs becomes necessary, and the notification timing of $patch and $subscribe.

Reactivity — choosing between ref and reactive

Explains how a change to a value reaches the screen, starting from the difference between ref and reactive. Covers why reassignment loses reactivity, the conditions under which destructuring breaks, and what toRefs preserves.

Slots — letting the parent render part of a component

Covers slots, which insert the parent's markup inside a child component. Works through when the fallback appears, how to test whether a slot was passed, scoped slots that hand the child's data to the parent, and type declarations with defineSlots.

Teleport and Suspense — moving where things render, and waiting on async

Covers Teleport, which renders elements elsewhere in the DOM tree, and Suspense, which gathers what is shown until async work finishes into one place. Explains what is left behind at the original position, when the fallback appears, and why it does not come back on later renders, all from measured behaviour.

Transitions — declaring enter and leave animations

Covers the machinery for animating elements as they appear and disappear. Explains the order classes are applied in, how Vue decides an animation has ended, the condition for waiting on done in JavaScript hooks, and how list reordering is followed, all from measured behaviour.

Vue Guide

A guide that starts from the Composition API in Vue 3.5 and works through reactivity, component design, Vue Router, Pinia, and Nuxt 4 across 20 chapters. Written around script setup and TypeScript, it explains why each API ended up shaped the way it is.

Vue Router basics — mapping URLs to components

Covers route definitions that map URLs to components. Explains links and programmatic navigation, dynamic routes with parameters, nested routes that share a layout, and the current way to write lazy loading and code splitting, all from measured behaviour.