React performance

Memo cache eviction

Memoized values are performance hints and may be discarded, so correctness must not depend on them.

Formal Syntax & Structure

react syntaxreact
const result = useMemo(calculate, [input])

Working Example

Example Snippetreact
const result = useMemo(calculate, [input])
React Reference