4.1 · The 2026 framework field
| Framework | Sweet spot | Watch out |
|---|---|---|
| Next.js (React) | Default for most product apps; App Router + RSC + Server Actions. | Vendor pull toward Vercel; learning curve on RSC. |
| Remix / React Router 7 | Web-platform-first; great forms & nested routing. | Smaller ecosystem than Next. |
| Astro | Content sites; islands; ship ~0 KB JS by default. | Not a SPA framework. |
| SvelteKit | Smaller bundles, simpler model; great DX. | Smaller hiring pool. |
| Nuxt (Vue) | Vue ecosystems; strong in EU/Asia. | Less momentum than Next. |
| SolidJS / SolidStart | Fine-grained reactivity; very fast. | Tiny community. |
| Qwik | Resumability — near-instant TTI on huge apps. | Adoption is slow. |
| HTMX + server templates | Server-rendered apps with surgical interactivity. | Limited for rich client UIs. |
4.2 · Rendering modes — pick once, suffer forever
4.3 · State management — pick the lightest thing that works
| Lib | For |
|---|---|
| Built-in React state + Context | Most components; don't over-engineer. |
| Zustand / Jotai | Small global stores without Redux ceremony. |
| Redux Toolkit | Big apps with complex flows; well-known patterns. |
| TanStack Query / SWR | Server-state: caching, dedupe, mutations, polling. |
| XState | Explicit state machines for complex UI flows. |
| Signals (Solid / Preact / Vue ref) | Fine-grained reactivity. |
Default rule: server state via TanStack Query, client state via Zustand or built-ins. Reach for Redux/XState only when the complexity is real.
4.4 · Styling & design systems
| Approach | Picks |
|---|---|
| Utility-first | Tailwind CSS (default in 2026). |
| CSS-in-JS | Vanilla-extract, Panda CSS, Emotion. Stitches is dead; styled-components is legacy. |
| Headless component libs | Radix UI, Headless UI, React Aria. |
| Full UI libs | shadcn/ui (copy-paste, owns the code), MUI, Mantine, Ant Design. |
| Design tokens | Style Dictionary, Tokens Studio; sync Figma ↔ code. |
4.5 · Data fetching
- Default to server-component fetch + Server Actions in Next 15+.
- For client interactivity use TanStack Query or SWR.
- For typed end-to-end use tRPC (within a monorepo) or generate clients from OpenAPI / GraphQL.
- Streaming + suspense — show skeletons fast, hydrate progressively.
4.6 · Build tools
| Tool | Where |
|---|---|
| Vite | SPA / library dev. Fast HMR. The default 2026 dev server. |
| Turbopack | Next.js bundler (Rust). Production-grade. |
| esbuild / swc | Underneath everything fast. |
| Bun | JS runtime + bundler + package manager + test runner in one binary. |
| Rspack / Rolldown | Rust-based Webpack/Rollup replacements. |
4.7 · Monorepos
| Tool | Notes |
|---|---|
| pnpm workspaces | Cheap, fast, the default base. |
| Turborepo | Cached task runner; great for JS/TS monorepos. |
| Nx | Heavier, opinionated, polyglot. Strong for very large orgs. |
| Moon / Lage | Newer alternatives in the same space. |
4.8 · The performance budget — Core Web Vitals
| Metric | What it measures | Good target |
|---|---|---|
| LCP (Largest Contentful Paint) | Loading | < 2.5s |
| INP (Interaction to Next Paint) | Responsiveness | < 200ms |
| CLS (Cumulative Layout Shift) | Visual stability | < 0.1 |
| TTFB | Server response | < 800ms |
| TBT / Total JS | Main-thread work; JS shipped | < 150 KB gzipped initial |
4.9 · Accessibility & i18n — non-negotiable
- WCAG 2.2 AA baseline. Test with axe + manual keyboard pass.
- Semantic HTML first; ARIA second.
- Keyboard focus visible; tab order matches reading order.
- i18n via ICU MessageFormat (FormatJS, lingui, next-intl). Pluralisation, RTL, locale-aware dates.
4.10 · The testing pyramid for frontend
- Unit — Vitest / Jest. Fast, hundreds per second.
- Component — Testing Library + Storybook stories as tests.
- E2E — Playwright (the default 2026). Cypress is legacy choice.
- Visual regression — Chromatic, Percy.
- Synthetic — Checkly / Datadog Synthetics for prod URL health.
4.11 · Self-check
Q1 · For server state (caching, dedupe, refetch), default tool?
Redux
TanStack Query / SWR
Context only
localStorage