memo cache

The fixed-size array of cached values the React Compiler gives each component, with one slot per memoized value.

In more detail

Compiled code checks whether a value inputs are unchanged, using Object.is; if so it reuses the slot, otherwise it recalculates and stores the new result. It is how the compiler does fine-grained memoization without dependency arrays you write.

Related terms

Taught in

References