From 05a73253c0383a730b3f543a572cf440b4fa3d47 Mon Sep 17 00:00:00 2001 From: Christian van der Loo Date: Sun, 3 Mar 2024 14:22:24 -0500 Subject: [PATCH] docs: readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9adf40a..4785954 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,10 @@ A fully-featured example can be found under the "example" directory. ## With Middleware -Here's an example with the Immer middleware. Note that types may not be as you expect when using Immer, as it derives the SetState type from the output of GetState, where `zustand-computed` makes SetState only allow the regular Store and the GetState return both the store and the computed store. +Here's an example with the Immer middleware. + +> [!WARNING] +> Types may not be as you expect when using Immer, as it derives the SetState type from the output of GetState, where `zustand-computed` makes SetState only allow the regular Store and the GetState return both the store and the computed store. To access the ComputedStore inside Immer, you will need to assert the `Store` type as `Store & ComputedStore`. ```ts const useStore = create()(