Global State: Zustand, Jotai or Signals?
Zustand, Jotai, and signals cut re-render costs beyond what the context API reaches. Selection criteria with render benchmarks.
Topic guide
High-performance frontend: React and Next.js, state management, Core Web Vitals (LCP, INP, CLS), CSS, design systems, and accessibility.
3 topics · 15 articles
Components, Server Components, and state management.
Zustand, Jotai, and signals cut re-render costs beyond what the context API reaches. Selection criteria with render benchmarks.
Server Components change caching, state, and rendering rules. The errors below cost days of debugging in real projects.
queryKey defines identity, staleTime defines freshness, mutations define invalidation. TanStack Query takes over the server cache of your React application.
Server Components never ship JavaScript to the client. Client Components need state, effects, and handlers. Composition rules, serializable props, and the await waterfall that costs seconds per request.
LCP, INP, and CLS: measuring and improving what users feel.
Minifying JS yields 3% LCP gains. Serving correct images yields 30%. Optimizations ranked by measured production impact.
Caching takes ten lines of code. Deciding what goes in, when it expires, and who deletes it takes the rest of the project. Strategies with Redis, CDN headers, and cache warming, with code.
A ramp scenario, a p95 threshold that fails the build, and k6 in CI. Load testing turns latency into a number the team defends and investigates with traces.
Token bucket, fixed window, and sliding log solve different problems. Key by IP, user, or API key, headers the client reads, and per-route limits. Code with Redis and express-rate-limit.
An honest EXPLAIN ANALYZE reveals the two-million-row scan. A guide to B-tree, GIN for JSONB, partial and covering indexes in production PostgreSQL.
Consistent interfaces that anyone can use.
A Lighthouse score of 100 means nothing accessible. Correct ARIA patterns, focus management, and screen reader testing.
Three products, three brands, one design system. Tokens separate decisions from values and make theming scale.
Cascade layers end the specificity wars; container queries let the card measure its own container. A migration path without rewriting your CSS.
Five squads in one repository choke merges and builds. Micro-frontends free the team and charge a price in runtime, deploys, and debugging. Adoption criteria and real costs.
Injection and broken access control lead the OWASP Top 10. The two-user test, CSP, Argon2, and the checklist that closes one real risk per CI run.
Monorepos solve code sharing and atomic refactors, and charge for tooling setup and boundary discipline. Adoption criteria, Turborepo versus Nx, and a folder structure that holds up.
Largest Contentful Paint: the time until the largest visible element on the page renders. The target is under 2.5 seconds.
Split by route. That way each user downloads only the code for the page they are on.
Use them sparingly, only after measuring a real performance problem in the profiler. Premature memoization adds complexity with no gain.
When SEO or time to first content matters. For internal dashboards behind a login, the extra complexity rarely pays off.