Skip to content

Commit d4e42ab

Browse files
authored
Add missing word (reactjs#5537)
1 parent 683db72 commit d4e42ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ A JSX node like `<List items={visibleTodos} />` is an object like `{ type: List,
633633

634634
However, if React sees the same exact JSX as during the previous render, it won't try to re-render your component. This is because JSX nodes are [immutable.](https://en.wikipedia.org/wiki/Immutable_object) A JSX node object could not have changed over time, so React knows it's safe to skip a re-render. However, for this to work, the node has to *actually be the same object*, not merely look the same in code. This is what `useMemo` does in this example.
635635

636-
Manually wrapping JSX nodes into `useMemo` is not convenient. For example, you can't do this conditionally. This is usually you would wrap components with [`memo`](/reference/react/memo) instead of wrapping JSX nodes.
636+
Manually wrapping JSX nodes into `useMemo` is not convenient. For example, you can't do this conditionally. This is usually why you would wrap components with [`memo`](/reference/react/memo) instead of wrapping JSX nodes.
637637

638638
</DeepDive>
639639

0 commit comments

Comments
 (0)