Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Add missing word (#5537)
Browse files Browse the repository at this point in the history
  • Loading branch information
beau-house authored Feb 2, 2023
1 parent 683db72 commit d4e42ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beta/src/content/reference/react/useMemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ A JSX node like `<List items={visibleTodos} />` is an object like `{ type: List,

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.

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.
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.

</DeepDive>

Expand Down

0 comments on commit d4e42ab

Please sign in to comment.