Skip to content
Blog / Web Development

Web Development

Frontend and full-stack web guides from client work: React and Next.js patterns, TypeScript that pays off, performance, and deployment.

·5 min

React Portals Done Right (Modals, Tooltips, Popovers)

Position: fixed still loses to an ancestor's overflow and transform. Portals escape the stacking-context trap, and the work is in the details: focus, Escape, scroll lock, cleanup.

ReactAccessibilityDOM
·5 min

Don't Sync State with useEffect (Derived State Instead)

Duplicating props into state and resyncing them with effects is the most common React state bug factory. Derived values compute during render and can never drift.

ReactHooksState Management
·5 min

Why React Composition Beats Inheritance Every Time

Class hierarchies broke against UI and React never brought them back. Children, slots, and render props cover every case inheritance promises, without the coupling.

ReactArchitecturePatterns
·5 min

React 19 Actions + FormData: Forms Without Controlled State

The controlled-input form pattern ships hundreds of re-renders per keystroke for no benefit. React 19 actions with FormData delete the state, the onChange, and the reset logic.

ReactFormsServer Actions
·5 min

useTransition for Non-Blocking UIs (And When useDeferredValue Fits)

Typing lags, tabs freeze, filters choke on big lists. React's transitions let urgent updates jump the queue while expensive ones render in the background.

ReactPerformanceHooks
·5 min

useRef vs useState in React: When to Use Each One

useRef vs useState explained simply: refs hold values without re-rendering, state triggers renders. Clear rules for when to use useRef and when state is the right choice.

ReactHooksJavaScript
·5 min

5 Rules for Custom Hooks That Don't Break Later

Most custom hooks grow into unmaintainable soup: ten responsibilities, hidden dependencies, race conditions. Five rules keep hooks small, honest, and testable.

ReactHooksTesting
·5 min

Suspense + Streaming: The Pattern You Should Already Be Using

Most slow Next.js pages are one slow query holding everything hostage. Suspense boundaries let fast content ship instantly while slow sections stream in.

ReactNext.jsPerformance
·5 min

Error Boundaries Are Not Optional in Production

One thrown error in one component unmounts your entire React tree by default. Error boundaries contain the blast radius, and most codebases never ship them.

ReactError HandlingJavaScript
·4 min

Stop Using Controlled Inputs for Everything

Controlled inputs re-render your form on every keystroke and most forms never need it. Where uncontrolled inputs with refs and FormData are simpler, faster, and harder to break, and the three cases that genuinely require controlled state.

ReactFormsPerformance
·4 min

React 19 State Batching Changes How You Write Forms

Three setStates in a row have always been one render, but React 19 goes further: automatic batching in promises and native handlers, plus form actions that reset inputs without a single state variable.

ReactReact 19Forms
·5 min

Why Your React List Performance Is Bad (It's the Keys)

Array index keys silently corrupt list state: wrong inputs filled, wrong rows animated, wasted re-renders. Why React needs identity, not position, and the cases where index keys are actually fine.

ReactPerformanceJavaScript
·5 min

useMemo and useCallback Are Slower Than You Think

Memoization has its own cost: dependency comparisons on every render, cached-value memory, and dependency arrays that lie. When wrapping everything in useMemo makes your app slower and the three cases that actually pay for themselves.

ReactHooksPerformance
·5 min

The useEffect Cleanup Function Is Almost Always Missing Something

Most cleanup functions stop at clearing a timeout. The bugs that reach production come from the cases nobody covers: aborted fetches, stale closure writes, listeners on changing deps, and StrictMode's double invoke.

ReactHooksJavaScript
·5 min

Server Components Click When You Stop Thinking in APIs

React Server Components are not about performance tricks. They change where your data lives. The mental model that made them obvious, with patterns I use daily.

ReactNext.jsServer Components
·4 min

TypeScript Types Don't Exist at Runtime. Zod Fixes That.

Your API types are lies until you validate them. How I use Zod to make TypeScript types real, with schemas that generate the types instead of decorating them.

TypeScriptZodValidation
·8 min

TypeScript Patterns I Actually Use in Production (Not the Fancy Stuff)

Most TypeScript tutorials teach fancy generics you never need. Here are the patterns I actually use: discriminated unions, branded types, narrowing, and exhaustive checks.

TypeScriptType SafetyWeb Development
·6 min

React Forms That Do Not Suck: React Hook Form Plus Zod Is the Stack I Use

Building React forms with useState is fine for two fields. It falls apart for real forms. React Hook Form + Zod is the stack I use for everything else.

ReactReact Hook FormZod
·7 min

It Is Time to Switch From Jest to Vitest, Here's Why and How

Jest has been the standard for a decade. Vitest is faster, has native ESM support, and integrates with Vite. Here's the migration I run on client projects.

VitestJestTesting
·8 min

Next.js App Router Streaming: Stop Blocking Your Page on Slow Queries

Most Next.js apps render everything or nothing. Slow database queries make the whole page wait. Streaming with Suspense changes that. Here's how to use it correctly.

Next.jsReactSuspense
·8 min

Practical Web Accessibility: What to Actually Fix (and What to Ignore)

WCAG has 1,000 rules. 20 of them cover 80% of real issues. Here's the practical accessibility checklist I use for client projects, focused on impact over checkboxes.

AccessibilityWCAGWeb Development
·7 min

TanStack Query Is the Last State Library Your React App Needs

Most React apps use Redux or Zustand for state that is not actually state, it is cached server data. TanStack Query handles that better. Here's how to use it.

ReactTanStack QueryState Management
·7 min

Tailwind CSS v4 Migration: What Actually Breaks (and What Got Way Better)

Tailwind v4 is a rewrite, not an upgrade. The oxide engine is faster, the config is gone, and several v3 patterns stop working. Here's the migration guide I wish I had.

Tailwind CSSCSSWeb Development
·6 min

Next.js Server Actions Are Great (Until You Use Them Wrong)

Server Actions are not a replacement for API routes. They shine for form mutations but break down for webhooks, third-party callbacks, and public APIs. Here's when to use them.

Next.jsServer ActionsReact
·6 min

Next.js Middleware for Auth, The Patterns That Actually Work

Next.js middleware is the worst-documented feature in the framework. Edge runtime limits, JWT verification gotchas, redirect loops. Here's the setup I ship.

Next.jsAuthenticationMiddleware
·6 min

Stop Using Context for Everything, When Zustand Wins in 2026

React Context is the default state tool for most teams. It's also the slowest for anything that updates often. Here's the actual decision framework.

ReactZustandState Management
·6 min

CORS, The Mental Model They Never Taught You

CORS is the most copy-pasted topic in web dev. Everyone adds Access-Control-Allow-Origin: * until it works. Here's what's actually happening under the hood.

CORSWeb DevSecurity
·7 min

Next.js App Router Patterns That Actually Scale (After 3 Production Apps)

App Router shipped in 2023. Three years later, most teams still use it like Pages Router with extra folders. Here's what actually scales past the demo.

Next.jsReactApp Router
·8 min

Stop Re-rendering Everything: A Practical Guide to React Performance

Most React performance advice is wrong. useMemo and useCallback won't fix your app. Here's what actually causes re-renders, and what to do about them.

ReactPerformanceFrontend
·8 min

How to Optimize Images for Web Performance, The Complete Guide

Images account for 50%+ of a webpage's weight. Fix your images and your site loads 2x faster. Here's everything that actually matters.

PerformanceWeb DevSEO
·9 min

How I Deploy Next.js Apps on Vercel, The Complete Setup (Domain, SSL, Analytics)

Deploying to Vercel takes 2 minutes. Setting it up properly takes 30. Here's the 30-minute version, custom domain, SSL, analytics, preview deploys, and rollback.

Next.jsVercelDeployment
·7 min

How to Write Clean Code That Other Developers Won't Hate You For

Clean code isn't about patterns or architecture. It's about the next person who reads it, usually you, 6 months later.

ProgrammingBest PracticesCareer
·6 min

Why Every Restaurant Needs a Website in 2026 (And Why Most Restaurant Sites Are Terrible)

70% of diners check a restaurant's website before visiting. Most restaurant sites look like they were built in 2005. Here's what yours actually needs.

Web DevelopmentBusinessRestaurants
·3 min

Building an E-Commerce Site with Next.js and Stripe, The Parts Nobody Covers

Stripe's docs are great. The edge cases that break your checkout flow? Not documented. Real lessons from building an online store.

Next.jsStripeE-Commerce