Making React Context Cheap with React Compiler
Summary
This article investigates how React context can trigger widespread re-renders and evaluates strategies to keep renders cheap, including context selectors, useSyncExternalStore, and compiler-assisted memoization. It provides benchmarks showing that compiler-assisted JSX reuse can match traditional patterns for large lists (e.g., 5,000 radios) and argues that the focus should be on render cost rather than render count.