Frontend & UI
Frontend in depth
A correct mental model for React Server Components, server state with TanStack Query, type-level TypeScript, proper ARIA widgets, Web Workers, real-user observability and micro-frontends — the hard parts under the framework surface.
7 parts129 min readUpdated Sep 20, 2026
Parts
Part 1
A Correct Mental Model for React Server Components: Two Module Graphs, One Boundary"use client" doesn't mark a kind of component; it marks where the client graph begins. This post rebuilds the mental model for RSC in Next.js 16: what crosses the boundary, where data fetching belongs, waterfalls, streaming, and the mistakes that bloat bundles or leak data.
18 min
Part 2
Server State Is a Cache, Not State: TanStack Query v5 in DepthData from the server isn't yours — you only hold a copy with an expiry date. This post goes deep on TanStack Query v5 through the lens of caching: query key design, staleTime and gcTime, invalidation, optimistic updates with rollback, Suspense, hydration with the Next.js App Router, infinite queries, and when not to use it.
17 min
Part 3
Type-Level TypeScript for API Contracts You Can't MisuseConditional types and infer, key remapping, template literal types that turn "/users/:id/posts/:postId" into typed params, a fetch client derived from a route map, typed errors, branded IDs, satisfies and const type parameters, a Zod bridge so the types aren't lies — and when to stop.
16 min
Part 4
Accessible Custom Widgets in React: ARIA Patterns That Actually WorkWhen native elements run out, ARIA is a contract you have to keep. The accessibility tree and name computation, roving tabindex vs aria-activedescendant, a combobox and tabs built step by step, live regions that really announce, focus on route changes, and how to test it all.
20 min
Part 5
Getting Work Off the Main Thread: Web Workers, Transferables, SharedArrayBuffer and Worker PoolsWeb Workers aren't magic for every slow page. This post covers when moving work to a worker pays off, what structured clone really costs, transferables, SharedArrayBuffer and COOP/COEP, a hand-written Comlink-style RPC, bundler setup, worker pools, cancellation with AbortSignal, real examples and alternatives like scheduler.yield.
17 min
Part 6
Frontend Observability in Practice: RUM with web-vitals, Private Source Maps and Browser-to-Backend TracesInstalling Sentry is only step one. This is how I build real frontend observability: lab vs field data, RUM with web-vitals attribution, beacons that don't get lost, sampling, private source maps, taming noisy errors, linking traces to the backend with traceparent, PII scrubbing, p75 dashboards and deploy markers.
21 min
Part 7
Micro-frontends, Honestly: When They're Worth It, How Module Federation 2.0 Works, and What They CostMicro-frontends solve an organizational problem — independent teams shipping independently — not a technical one. This post compares five ways to compose a frontend, digs into Module Federation 2.0 (shared singletons, version skew, manifests, types, fallbacks) and shows when a Turborepo monorepo is the better answer.
20 min
Series review
0/14 answered · 0 correct
14 questions drawn from the parts of this series. Answers here count toward each post's own quiz.
Other series
Series- AI engineering for web developers4 parts · 86 min read0/4 read
- NestJS in production3 parts · 67 min read0/3 read
- Web performance from the ground up8 parts · 74 min read0/8 read
- Modern CSS and the web platform5 parts · 46 min read0/5 read
- Frontend architecture that lasts5 parts · 30 min read0/5 read
- The engineering craft4 parts · 21 min read0/4 read
- Business analysis for product teams6 parts · 147 min read0/6 read
- Web application security9 parts · 168 min read0/9 read