Part 9 · 2 chapters · ~15 min

The Libraries They Wrote and Why

React, Relay, Flow, Jest, Recoil, Hermes, Fresco and Lexical read as answers to problems at scale, with dates, costs and what became of each, and the course in one table: the machine, the human process it replaced, the signal you need it, and the idea that transfers at any scale.

19

The libraries, by the problem each answered

read them as answers
  1. React (2013): UI code whose state transitions nobody could reason about. The answer: UI as a function of state, re-render on change, a reconciler computes the DOM update (the React course). The cost: a model to learn and a decade of making re-render-everything fast (fiber, concurrent rendering, the compiler).
  2. Relay and GraphQL (2015): data fetching that could not be composed across thousands of components on one graph. The answer: fragments, a compiler, a masked normalised store (part 3). The cost: a schema team and a discipline; GraphQL travelled widely, Relay less, because the discipline is the hard part.
  3. Flow (2014) and TypeScript (2012): a JavaScript codebase too large to refactor safely. Flow: gradual, inference-heavy, a server for millions of lines in one monorepo. TypeScript: a language extension and tooling for everyone. TypeScript won the ecosystem; Flow remains right for the codebase it was built for. A tool built for one scale can lose to one built for all scales and still be correct at home.
  4. Jest (2014): a suite too slow, with tests interfering through shared module state. The answer: parallel workers with per-file module isolation, snapshots, module-graph mocking, affected-only watch. Vitest later reused the API on a faster engine: the usual fate of a successful answer.
  5. Recoil (2020): state that re-rendered whole trees and recomputed derived values. The answer: atoms and selectors with per-atom subscriptions (the React course part 7's state kinds as a library). Archived; Jotai and Zustand carry the ideas; the React compiler is the team's own answer. The problem outlived the library.
  6. Hermes (2019), Fresco (2015), Lexical (2022): a JavaScript engine that started too slowly on low-end phones (ahead-of-time bytecode, a small heap, no JIT: the JS course's engine trade-offs made for phones); Android image loading that exhausted the Java heap (decode into native memory, a pipeline with caches: the FSD course M3's decode budget as a library); a rich-text editor that had become unmaintainable (an immutable editor state, plugins, accessibility first: the FSD course M5's editor model). Platform-specific answers to scale-specific pain.
THE LIBRARIES, BY THE PROBLEM EACH ANSWERED
a timeline of what broke at scale and what was built in response
swipe the figure sideways, or tap expand for full screen
1/6
React
2013, React: the problem was UI code whose state transitions nobody could reason about; two-way binding and manual DOM updates produced bugs that depended on the order things happened. The answer: describe the UI as a function of state, re-render on every change, and let a reconciler compute the DOM update (the React course part 1). The cost: a rendering model everyone had to learn, and a decade of performance work (fiber, concurrent rendering) to make re-render-everything fast enough.
20

The course, in one table

the machinethe human process it replacedthe signal you need itthe transferable ideapart
Four team kinds with ratiosEveryone does everythingThree date pickers; slow builds for allSomeone owns the platform; someone owns the build0
Hermetic builds, merge queueDependencies by convention; a trunk fixed by handPasses here, fails there; a red trunk for hoursDeclared deps; affected-only CI; a queue1
An internal frameworkPatterns enforced by reviewThree routers, four fetch patternsOne way per concern, enforced by lint2
Relay, data maskingOver-fetching caught by reviewersFields nobody dares removeColocated data needs; generated types; no arbitrary queries3
Codemods and botsUpgrades by requestA rename takes a yearCompatibility, a codemod, a count, a date4
The experiment platform, holdoutsA spreadsheet of experimentsCollisions; metrics chosen afterPre-register, check SRM, declare guardrails, someone else decides5
Budgets in CI, release trainsPerformance by attention; deploy when readyGradual growth; every deploy a releaseA budget with a ratchet; a cadence with gates and switches6
OWNERS, readability, lint as policyReview by whoever is aroundLatency climbing; style debated per PRSmall changes; a written bar; repeated comments become rules7
Versioned client alerts, runbooksUsers report breakageDetection by user report; unactionable pagesVersion on every metric; levers with reach; blameless reviews8
The libraries(each a problem at scale)The same problem, measuredRead a library as an answer; adopt the idea, weigh the machinery9
what to keep
  1. Machinery is a fossil of a process that stopped scaling. Measure the process before buying the machine.
  2. The ideas transfer at any scale; the machinery transfers only past the point. A team of thirty can run most of this course with ordinary tools and the discipline.
  3. Ownership is the thread: OWNERS decides who approves, who is paged, who the bots ask, and whose budget it is. Write it down.
  4. The libraries are answers; ask what question yours is asking before adopting one.
the exercise, for the course
Fill in the table for your organisation: for each row, is the human process failing measurably, and what would the signal be? The rows where it is failing are the machinery to build or adopt, in order of the signal's severity; the rows where it is not are the fossils to avoid.