Join us for React Conf on Oct 7-8.
Learn more.
React
v19.2
Search
⌘
Ctrl
K
Learn
Reference
Community
Blog
On this page
Overview
Reference
useMemo(calculateValue, dependencies)
Usage
Skipping expensive recalculations
Skipping re-rendering of components
Preventing an Effect from firing too often
Memoizing a dependency of another Hook
Memoizing a function
Troubleshooting
My calculation runs twice on every re-render
My
useMemo
call is supposed to return an object, but returns undefined
Every time my component renders, the calculation in
useMemo
re-runs
I need to call
useMemo
for each list item in a loop, but it’s not allowed