Skip to content

Commit

Permalink
docs: fix typo in Prevent rerenders with useShallow section (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
f312213213 authored Sep 30, 2024
1 parent 6b29015 commit 17b208a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guides/prevent-rerenders-with-use-shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nav: 16
When you need to subscribe to a computed state from a store, the recommended way is to
use a selector.

The computed selector will cause a rererender if the output has changed according to [Object.is](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is?retiredLocale=it).
The computed selector will cause a rerender if the output has changed according to [Object.is](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is?retiredLocale=it).

In this case you might want to use `useShallow` to avoid a rerender if the computed value is always shallow
equal the previous one.
Expand Down

0 comments on commit 17b208a

Please sign in to comment.