From 750e2cec32728e7e9be5273cfc28be905cb3bc64 Mon Sep 17 00:00:00 2001 From: xch1029 <158972928@qq.com> Date: Mon, 24 Jan 2022 11:18:15 +0800 Subject: [PATCH] =?UTF-8?q?Update=20227.=20=E7=B2=BE=E8=AF=BB=E3=80=8Azust?= =?UTF-8?q?and=20=E6=BA=90=E7=A0=81=E3=80=8B.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\343\200\212zustand \346\272\220\347\240\201\343\200\213.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/\346\272\220\347\240\201\350\247\243\350\257\273/227. \347\262\276\350\257\273\343\200\212zustand \346\272\220\347\240\201\343\200\213.md" "b/\346\272\220\347\240\201\350\247\243\350\257\273/227. \347\262\276\350\257\273\343\200\212zustand \346\272\220\347\240\201\343\200\213.md" index 384218d3..95f746b6 100644 --- "a/\346\272\220\347\240\201\350\247\243\350\257\273/227. \347\262\276\350\257\273\343\200\212zustand \346\272\220\347\240\201\343\200\213.md" +++ "b/\346\272\220\347\240\201\350\247\243\350\257\273/227. \347\262\276\350\257\273\343\200\212zustand \346\272\220\347\240\201\343\200\213.md" @@ -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