Frontend Developer
Deep Dive intoReact
I solve product problems with React and TypeScript, then document what I learned.
Recent
Latest posts
Archive
All posts
I solve product problems with React and TypeScript, then document what I learned.
Latest posts
All posts

When tests in React Router or TanStack Query fail, I usually inspect my code first. When tests I wrote fail, I sometimes end up re-checking the test itself as well. That difference made me rethink the boundary between unit, integration, browser, and e2e tests.

Two sentences in the React docs looked contradictory at first. useRef stores values not needed for rendering, yet React says not to read ref.current during render. Tracing the source code shows these are about two different dimensions of rendering: trigger vs consistency, all the way to tearing.

Tracing just next/navigation through the source reveals where the complexity comes from: re-export entry points, context adapters, and .react-server.ts splits.

When tests in React Router or TanStack Query fail, I usually inspect my code first. When tests I wrote fail, I sometimes end up re-checking the test itself as well. That difference made me rethink the boundary between unit, integration, browser, and e2e tests.

Two sentences in the React docs looked contradictory at first. useRef stores values not needed for rendering, yet React says not to read ref.current during render. Tracing the source code shows these are about two different dimensions of rendering: trigger vs consistency, all the way to tearing.

Tracing just next/navigation through the source reveals where the complexity comes from: re-export entry points, context adapters, and .react-server.ts splits.

Small React source-level optimizations explained: Object.freeze in DEV, Hidden Class effects, branch ordering, and Smi/Double choices.

ESM can be asynchronous and still statically analyzable. This post explains why through the Construction, Instantiation, and Evaluation phases.

Why Map and Set often outperform Array: hash-based lookup complexity, insertion behavior, and traversal trade-offs including cache locality.