Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ascoders/weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
ascoders committed Feb 7, 2022
2 parents 751d78b + acfb7fd commit 98cc6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 源码解读/227. 精读《zustand 源码》.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const useStore = create(set => ({
还是用英文比较表意,即 `subscribeWithSelector`,这个中间件可以让我们把 selector 用在 subscribe 函数上,相比于 redux 传统的 subscribe,就可以有针对性的监听了:

```typescript
mport { subscribeWithSelector } from 'zustand/middleware'
import { subscribeWithSelector } from 'zustand/middleware'
const useStore = create(subscribeWithSelector(() => ({ paw: true, snout: true, fur: true })))

// Listening to selected changes, in this case when "paw" changes
Expand Down

0 comments on commit 98cc6ac

Please sign in to comment.