react-brain
Menu · Topics

React & language foundations

19 readings on react & language foundations, each with our note on why it matters.The articles are the originals — read them there.

React core — version, Compiler, RSC, concurrent features

React.lazy, Suspense and the Hidden 300ms Startup DelayMatthew Wong (Tab Widgets) · tabwidgets.com

Your lazy-loaded UI appears later than its code arrives: React.lazy suspends once by design and Suspense reveals are throttled to ~300ms, so render a placeholder instead of suspending for components that render at startup.

Two intentional React behaviours that combine badly at startup: a React.lazy component always suspends on its first render even when its chunk is already loaded (preloading the import() does not help), and React reveals suspended content at most once per ~300ms since the last fallback appeared (FALLBACK_THROTTLE_MS). Widgets whose code loaded in ~100ms appeared at ~380ms; rendering their own placeholder instead of suspending brought content ~200–240ms sooner, while shrinking the bundle changed nothing.

Avoiding Server Component Waterfall Fetching with React 19 cache()Aurora Scharff · aurorascharff.no

You fetch in Server Components — a child awaiting the same data as a parent serializes into a waterfall unless the fetch is wrapped in React 19 cache(); preload by calling the cached fetch un-awaited up-tree, but only where a waterfall is measured.

The corpus's cache() coverage (nothing else here or in RB-E-DATA held it): React 19's cache() gives per-render memoization for server-side fetches, and the PRELOAD pattern it enables — fire the cached fetch un-awaited high in the tree so deep Server Components that await the same call hit the memo instead of serializing a waterfall. Pedagogical (mock-data demo, mechanics-focused), and the author's own caveat is the durable half: preloading couples the parent to a child's data needs, so don't scatter it prematurely — use it where a measured waterfall exists. Kept on the advocate pass as the gap-filler, not as a deep architectural reference.

The hidden cost of React.ActivityPeter Piekarczyk · peterp.me

The when-NOT-to caveat behind this entry's <Activity> row: hiding preserves STATE but destroys and re-creates EFFECTS on every toggle — so effect-shaped work (keyboard subscriptions, analytics, listeners) piles up subscription/setState waves each time a hidden RN screen is shown again.

Pair <Activity> with disciplined effect cleanup or don't use it for effect-heavy subtrees.

How to Build the Fastest Apps: Break the Rules (App.js Conf 2026)Jay Meistrich (Software Mansion) · youtube.com

Reframes rendering cost as the dominant hidden bottleneck: React's `render` doesn't just paint — it passes state down, updates context consumers, fires effects, and re-subscribes queries, so ordinary patterns (lift-state-up, effects-for-coordination, `useContext` on a whole value, deps-array callbacks) cascade renders top-down (measured ~10x CPU top-vs-leaf).

The React Compiler can't save you when a prop *actually* changes. The prescribed toolkit — `useEffectEvent`/stable event callbacks (no deps-array cascades), imperative APIs over hooks (get-a-value + subscribe instead of re-render), `use-context-selector`, and providing *stable* objects through Context — extends the Erikson rendering guide below into a 'render once' discipline. Vendor angle (pitches Legend State), but the render-model reasoning is framework-agnostic. See RB-E-STATE for the state-architecture half.

A (Mostly) Complete Guide to React Rendering BehaviorMark Erikson, Redux maintainer · blog.isquaredsoftware.com

The end-to-end explanation of when and why React renders — render vs commit, reconciliation, the cascade to children, memo/useMemo/useCallback, Context behavior.

The mental model that makes the React Compiler's auto-memoization comprehensible rather than magic.

Writing Custom Renderers for ReactMaciej Jastrzębski (Callstack) · callstack.com

How React's reconciler connects to a host environment (the renderer interface), and why React Native Testing Library needed its own renderer.

The canonical explanation of React's renderer architecture.

Component Architecture for React Server ComponentsAurora Scharff · aurorascharff.no

Traces the move from useEffect/React-Query/route-loaders to component-level RSC data fetching, with durable principles: component autonomy, deliberate Suspense boundaries, skeleton co-location.

RSC architecture from a recognized educator.

Building Bulletproof React ComponentsShu Ding (Vercel; SWR creator) · shud.in

Ten component-design patterns for SSR/hydration, multiple instances, concurrent rendering, portals, view transitions, and tainting (useId, React.cache, taintUniqueValue).

A durable component-API mental model from an authoritative author.

Understanding why React Fiber existsSankalpa Acharya (inside-react) · inside-react.vercel.app

Traces React 15's non-interruptible recursive reconciliation to Fiber's linked-list + time-slicing design — the 'why it exists' explainer for concurrent React.

First in a React-internals series (key-prop, state-updates, out-of-order streaming also available).

How does React Fiber render your UISankalpa Acharya (inside-react) · inside-react.vercel.app

A first-principles walk through Fiber's four phases (trigger/schedule/render/commit), the fiber-node shape, time-slicing, and the bitmask lane-priority system.

Durable internals knowledge that survives version churn.

Two React design choices developers don't like (but can't avoid)Ryan Carniato (Solid.js) · dev.to

A competing-framework author argues deferred state commits and effect dependency arrays are forced by async UI, not arbitrary — even signal-based frameworks hit the same wall.

An unusually credible mental model for React's most-griped-about choices.

The React Compiler (explained via its actual output)Neci Dan (neciudan.dev) · neciudan.dev

You hand-memoize without the React Compiler — this shows the emitted cache-slot output that replaces useMemo/useCallback (and memoizes where hooks can't, e.g. behind early returns); the concrete before/after for adopting it.

The what-does-it-actually-emit explainer the other compiler readings skip: a TodoList compiled into cache-slot code (_c() slots + reference-equality checks — a custom caching system, NOT inserted useMemo/useCallback), dependencies inferred from code FLOW rather than manual arrays, memoization applied where hooks are prohibited (behind early returns), and why identical cached JSX objects stop child re-renders without memo wrappers. Plus a staged adoption path (gradual gating, canary) grounded in Meta/Sanity/Wakelet production numbers. Pairs with the saschb2b retrospective (adoption/bail-outs) — this one is the transformation mechanics.

Props, Composers, and Providers: the composition pattern we're converging onMaxime Grébauval (Orus) · backstage.orus.eu

You create Context in many files — climb the composition ladder instead of reaching for providers by default: plain props, then compound components with slots, and only then a Composer + Providers, each rung justified by a named pain.

The composition facet these readings otherwise skip — they explain how React RENDERS, this explains how to SHAPE a component API as an app grows. A production team's four-rung ladder with the named pain that justifies each climb: plain props (where most components should stay) → compound components with slots (when a row sprouts a prop for every shape) → a Composer plus Providers (when the same UI must render data from swappable or deferred sources) → lifted state behind a contract (when state must cross a boundary and the layout should stay pure). The first two rungs use no context at all. Its governing rule is the useful one: an abstraction earns its place by making a CURRENT requirement simpler, never by betting on a future you can't see.

React Compiler at Eighteen MonthsSascha Becker · saschb2b.com

You ship the React Compiler — know the bail-out patterns and keep existing useMemo/useCallback in place (removal can change compiler output); this retrospective is the staged-adoption map.

An 18-month retrospective: how auto-memoization retired the missing-dependency bug class, the five patterns where the compiler bails out, and a staged adoption path. The mental model for the compiler era (complements the official release post in sources).

React Native release timeline — what each version changed

React Native Architecture: From Bridge to FabricFelipe Ramalho (Codeminer42) · blog.codeminer42.com

Traces RN's architecture from the old async JSON bridge to the New Architecture (JSI, Fabric's immutable C++ shadow tree, Turbo Modules, Codegen), explaining why each piece exists.

The 'why it changed' narrative behind the 0.76→0.82 version arc — not a release note.

TypeScript rigor & public API typing

Migrating a Large Flow Monorepo to TypeScriptShawn Walton (Yelp Engineering) · engineeringblog.yelp.com

You still run Flow — exiting it is a package-by-package program, not a codemod: keep type integrity throughout (flowgen turns emitted .d.ts back into Flow headers), convert deepest dependencies first, and expect uptake to stall until deadlines land.

The receipt under this entry's 'not at Meta → use TypeScript, not Flow' line, and the shape of a type-checker migration you cannot do in one cut: 1.4M SLoC across 570 packages, three years and seven months, ending February 2026. The load-bearing decision was refusing to suspend type-checking anywhere — 'code that loses coverage from its type checker, tests, or linter almost never regains it' — which ruled out a big-bang rewrite and forced Flow and TypeScript to coexist in production. The mechanism: convert one package at a time (flowts first, later Stripe's flow-to-typescript-codemod, which cut the manual tail), then run flowgen to turn the emitted .d.ts back into Flow headers so still-Flow consumers keep type-checking. Because no tool generates .d.ts FROM Flow, the order is forced — deepest internal dependencies first, up the tree. What actually moved the needle was not tooling: a year of dogfooding on ~90 foundational packages before launch, documentation and outreach, a dependency-graph score that ranked which package unblocks the most others, auto-filed Jira tickets when a package became convertible, and finally hard quarterly deadlines — voluntary migration plateaued once the enthusiasts were done. LLM-driven conversion was tried in 2023 and abandoned as unreliable. Outcome: type coverage 83.15% (Flow) → 96.44% (TS), ~6,000 @ts-expect-error (2,000 of them mass-added when the team auto-suppressed the last few dozen orphaned packages to finish), 82% of surveyed engineers reporting a productivity gain.

Why does tsgo use so much memory?Zackary Radisic · zackoverflow.dev

A heap-level investigation of the Go TypeScript compiler — per-thread Checker duplication, never-freed types, symbol duplication, AST at 45% of heap, plus a fix.

A durable deep-dive on TS7/tsgo internals and its concurrency model's cost.

TypeScript Performance in TanStack Table V9Kevin Van Cott (TanStack) · tanstack.com

Concrete techniques to cut type-instantiation cost 62-86% (feature maps, materialized interfaces, in/out variance annotations, explicit type args), with measurements.

The reference for heavy-generics library authors.

Iterating Faster with TypeScript 7VS Code team (Microsoft) · code.visualstudio.com

You ship TypeScript — TS 7 (Go-native tsc, ~10x) is stable; migrate incrementally through the TS 6 bridge, then run 6 and 7 side-by-side in CI (VS Code cut type-checking 36s→5s; the blocker was formatter diffs, not type errors).

The production adoption case the tsgo-internals piece lacks: VS Code's ~50-extension codebase cut type-checking 36s→5s (~7x) and editor project-load 60s→10s by migrating INCREMENTALLY — TS 6.0 as a low-churn bridge, then TS 6-and-7 side-by-side in CI (TS 6 still emitting), then esbuild + TS 7 as the default. The surprising blocker wasn't type errors but formatter differences failing pre-commit checks. Evidence that TS 7 (Go-native tsc) is trustworthy for daily use on a large real codebase — if you bridge through TS 6 first.