Building a Typed Fetch Factory
Post · Aug 25, 2026
How a single createFetcher factory infers request/response types from an OpenAPI schema and layers in caching, retries, and cancellation, and why each piece is built the way it is.
Post · Aug 25, 2026
How a single createFetcher factory infers request/response types from an OpenAPI schema and layers in caching, retries, and cancellation, and why each piece is built the way it is.
Snippet · Sep 1, 2026
A `localStorage`-backed `useState` built on `useSyncExternalStore`: no hydration mismatch under SSR, live updates when another tab writes, and live updates when another hook on the same page writes.
Snippet · Sep 1, 2026
One hook that lets a component be driven from outside (`value` + `onChange`) or manage its own state (`defaultValue`), the same two-mode contract a native `<input>` has, while the component body only ever reads one value and calls one setter.
Snippet · Sep 1, 2026
A boolean `useState` that hands back `on` / `off` / `toggle` instead of a raw setter, so call sites read as intent. Every function, and the controls object itself, stays referentially stable, safe to pass as props or list as effect dependencies without retriggering anything downstream.
Snippet · Aug 25, 2026
A reusable fetch factory that infers request/response types from an OpenAPI schema and adds in-memory caching, retry with backoff, and AbortController support, no per-endpoint boilerplate, no `any`.
Cheatsheet · Sep 1, 2026
An App Router route is prerendered by default and silently turns dynamic the moment you read something request-specific. Knowing which bucket a route belongs in (and what forces it out) is the difference between an instant page and a server render on every hit.
Project · Sep 1, 2025
Project · Jan 13, 2025
Project · Jan 12, 2025
Project · Sep 1, 2021