diff --git a/content/docs/hooks-reference.md b/content/docs/hooks-reference.md index 1aa14c7f285..65718a7513f 100644 --- a/content/docs/hooks-reference.md +++ b/content/docs/hooks-reference.md @@ -384,7 +384,7 @@ Pass a "create" function and an array of dependencies. `useMemo` will only recom Remember that the function passed to `useMemo` runs during rendering. Don't do anything there that you wouldn't normally do while rendering. For example, side effects belong in `useEffect`, not `useMemo`. -If no array is provided, a new value will be computed on every render. +If an empty array is provided, the value will be memoized once and always returned. If no array is provided, a new value will be computed on every render. **You may rely on `useMemo` as a performance optimization, not as a semantic guarantee.** In the future, React may choose to "forget" some previously memoized values and recalculate them on next render, e.g. to free memory for offscreen components. Write your code so that it still works without `useMemo` — and then add it to optimize performance.