Box model — what "width" actually refers to
This chapter covers the CSS box model — the four regions of content, padding, border, and margin, and how box-sizing changes the interpretation of width. It walks through how far the background gets painted, when margin collapsing happens, and the idiom of applying border-box in a reset.
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.
Computed properties and watchers — separating derivation from side effects
Contrasts caching in computed with side effects in watch, and gives the criteria for choosing between them. Also covers automatic dependency tracking in watchEffect and cleaning up asynchronous work.
Core Web Vitals — narrowing causes from LCP / INP / CLS
This chapter covers the definitions and thresholds of the three Core Web Vitals (LCP, INP, CLS), and the procedure for narrowing down the cause from combinations of the readings. It explains why slow server responses are not the main cause of poor INP and how CLS worsens with unsized late-arriving content.
Declarative and imperative UI — deriving UI from state
This chapter contrasts declarative and imperative UI by writing the same screen both ways. It covers why declarative UI reduces the mismatch between state and rendering, where you still need to touch the DOM directly, and what price you pay for it.
Events and form input — feeding input back into state
Covers how to write event handlers, the modifiers available, and two-way binding with v-model. Also explains how adding or dropping the parentheses on a handler changes whether the event object is passed.
Frontend
A hub for the domain that collects notes on frontend development, such as React, Vue, Tailwind CSS, shadcn/ui, and Base UI. It covers UI construction, styling, and component design.
HTTP requests and data fetching — deciding where fetch logic lives
Covers where to write server communication. Handles cancellation and race conditions, switching endpoints with environment variables and what ends up in the build output, and choosing between Nuxt's useFetch and $fetch.
Lifecycle — hook order and where each piece of work belongs
Lays out the hooks from creation to teardown along with the order they run in. Covers deciding where to write DOM work and where to do cleanup.
Navigation guards — blocking and redirecting navigation
Covers guards that intercept route navigation. Confirms the official 12-step resolution flow by measurement, and explains the return form, the now-deprecated next(), how meta is merged, and how to avoid infinite redirects.
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.
Optimistic updates — advancing the UI without waiting for a response
This chapter explains optimistic updates by walking through the flow of advancing the UI on the assumption of success and rolling back on failure. It covers what actually gets faster and what doesn't, when to use it and when not, and why you cannot skip server-side validation.
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.
Practice: authentication and deployment — the login flow and where the build output goes
Works through holding authentication state via a login flow. Confirms why the token does not go in localStorage, httpOnly cookies and protecting navigation with middleware, and the build output and hosting configuration, from actual behaviour.
provide / inject and custom directives — passing values past the hierarchy, and touching the DOM
Covers provide and inject, which avoid prop drilling. Explains how values are looked up, the conditions under which the default is not used, typing with InjectionKey, and moving DOM work that template notation cannot express into custom directives.
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.
Rendering patterns — CSR / SSR / SSG / ISR
This chapter organizes CSR, SSR, SSG, and ISR along a single axis — when and where the HTML gets built. It walks through each pattern's trade-offs in initial paint, freshness, SEO, and server load, and the procedure for choosing a pattern from requirements.
script setup and the component contract — declaring props and emits as types
Covers declaring the parent-child boundary as types with defineProps and defineEmits. Includes props destructuring, stabilised in Vue 3.5, and how to obtain template refs.
Selectors and cascade — combinators, pseudo-classes, and specificity
This chapter explains the kinds of CSS selectors, the difference between combinators, the distinction between pseudo-classes and pseudo-elements, and how to compute specificity. It covers the ordering between IDs and classes, the fact that the universal selector and combinators don't contribute to specificity, and what the cascade looks at beyond specificity.
Setup and single-file components — the smallest setup to start with
Covers creating a Vue 3 and TypeScript project with create-vue, and the three-block structure of a single-file component. Also sorts out how to answer the interactive prompts and what each generated directory is for.
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.
Template syntax and directives — projecting state onto the screen
Covers attribute binding, switching classes and styles dynamically, conditionals, and list rendering. Also works through why v-for needs a unique key and how to choose between v-if and v-show.
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.
v-model between components — wiring two-way binding with defineModel
Covers how to give your own components a v-model. Explains bundling the props-and-emit pair with defineModel, whether the value sits on the parent or the child, how to name several two-way values, and how modifiers arrive.
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.