docs: fix typo in Prevent rerenders with useShallow section (#2761)

This commit is contained in:
David 2024-09-30 19:56:25 +08:00 committed by GitHub
parent 6b29015c3b
commit 17b208a91f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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