Skip to content

Commit

Permalink
fix wording
Browse files Browse the repository at this point in the history
  • Loading branch information
sewera authored and dai-shi committed Aug 12, 2023
1 parent f79020b commit a757a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const honey = useBearStore((state) => state.honey)

If you want to construct a single object with multiple state-picks inside, similar to redux's mapStateToProps, you can tell zustand that you want the object to be diffed shallowly by passing the `shallow` equality function.

To use a custom equality function, you need `createWithEqualityFn` from `zustand/traditional`. It takes the second argument for the default equality function.
To use a custom equality function, you need `createWithEqualityFn` instead of `create`. Usually you want to specify `Object.is` as the second argument for the default equality function, but it's configurable.

```jsx
import { createWithEqualityFn } from 'zustand/traditional'
Expand Down

0 comments on commit a757a25

Please sign in to comment.