Next.js Memory Leak: The Timer That Kept Every Request
A Next.js memory leak where one setTimeout per SSR render kept finished requests in memory. How it was spotted, measured with heap snapshots, and fixed.

Practical, diagram-first explanations you can read over coffee. 91 posts and counting.
Newest postAsyncLocalStorage in Node.js gives each request its own data that follows it through every await. Learn how it works and how Next.js cookies() uses it.
A Next.js memory leak where one setTimeout per SSR render kept finished requests in memory. How it was spotted, measured with heap snapshots, and fixed.

A database index works like the index at the back of a book. Learn how indexes make queries fast, what they cost, and how to explain them in an interview.

any vs unknown vs never in TypeScript: any skips the checks, unknown makes you check first, never means it can't happen. When to use each, with short examples.

Sessions vs JWT explained with a coat check and a wristband: who stores the login, why JWTs are hard to revoke, and which one to pick for a web app.

async vs defer on a script tag: both download without blocking, but async runs the moment it arrives and defer waits for the HTML, in order. Learn which to pick.

Idempotency means doing something twice has the same effect as doing it once. Learn how idempotency keys make retries safe, and why PUT is idempotent but POST isn't.

forEach with async/await doesn't wait. It starts every callback and returns undefined, so your code moves on early and errors skip your try/catch. Use for...of or Promise.all.

Server first, browser second. Render goes down the tree, effects come back up. The order of every hook from request to state update, measured.

Short posts on one theme, meant to be read in order. Each part stands alone, and together they build the full picture.
Get new posts in your inbox
One email when a new post is out: short, diagram-first explanations of JavaScript, React and Next.js. No spam, unsubscribe any time.