Skip to content

Commit 1a69206

Browse files
authored
fix typo in useMemo() documentation [BETA] (reactjs#5119)
1 parent 2a083f9 commit 1a69206

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beta/src/content/apis/react/useMemo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ On the initial render, the <CodeStep step={3}>value</CodeStep> you'll get from `
4040

4141
On every subsequent render, React will compare the <CodeStep step={2}>dependencies</CodeStep> with the dependencies you passed during the last render. If none of the dependencies have changed (compared with [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)), `useMemo` will return the value you already calculated before. Otherwise, React will re-run your calculation and return the new value.
4242

43-
In other words, `useCallback` caches a calculation result between re-renders until its dependencies change.
43+
In other words, `useMemo` caches a calculation result between re-renders until its dependencies change.
4444

4545
**Let's walk through an example to see when this is useful.**
4646

0 commit comments

Comments
 (0)