Skip to content

Commit 9ec6565

Browse files
authored
Update README.md
1 parent d22a224 commit 9ec6565

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ The issue is that component props are compared by reference, not value. This is
174174

175175
However, this makes it easy to accidentally cause unnecessary renders, making the app slow. Even in production apps, with hundreds of engineers, can't fully optimize their apps (see [GitHub](https://github.com/aidenybai/react-scan/blob/main/.github/assets/github.mp4), [Twitter](https://github.com/aidenybai/react-scan/blob/main/.github/assets/twitter.mp4), and [Instagram](https://github.com/aidenybai/react-scan/blob/main/.github/assets/instagram.mp4)).
176176

177-
This often comes down to props that update in reference, like callbacks or object values. For example, the `onClick` function and `style` object are re-created on every render, causing `ExpensiveComponent` to slow down the app:
177+
This often comes down to props that update in reference, like callbacks or object values. For example, the `onClick` function and `style` object are re-created on every render, causing `ExpensiveComponent` to re-render and slow down the app, even if `ExpensiveComponent` was wrapped in React.memo:
178178

179179
```jsx
180180
<ExpensiveComponent onClick={() => alert("hi")} style={{ color: "purple" }} />

0 commit comments

Comments
 (0)