satisfies, as, as const, and is: How TypeScript Labels a Value
as const keeps the exact value. satisfies checks a type and keeps it. as replaces the type. is narrows it when a check returns true.

Practical, diagram-first explanations you can read over coffee. 81 posts and counting.
Newest postBoolean and !! match. Number and + match, except a BigInt. String(null) is "null"; null.toString() throws.
as const keeps the exact value. satisfies checks a type and keeps it. as replaces the type. is narrows it when a check returns true.

A barrel re-exports a whole folder. Tree shaking may still drop unused code, but the bundler often walks every file behind that index first.

var and let are both registered when the scope starts. var is already undefined. let stays untouchable until its line runs.

The collector paints every object reachable from the stack and globals. Whatever the paint misses is unused, even if objects still point at each other.

useEffect runs after the browser paints. useLayoutEffect runs before that paint, so a measurement can fix the screen before anyone sees the wrong frame.

XSS runs the attacker's code on your page. CSRF makes the browser send a request you didn't mean to. Each cookie flag stops only one of them.

John Ousterhout's book in one sitting: complexity is the enemy, deep modules fight it, and 10–20% of your time should go to design. Five ideas to use on Monday.

Server Components send the result; Client Components send the result plus the code. What 'use client' really does, why it doesn't mean browser-only, and where to put it.

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.