Replies: 1 comment 6 replies
-
Instead of struggling with store creator, would you make a custom hook? const useStoreOrig = create(...)
const useStore = (selector, equalityFn = shallow) => useStoreOrig(selector, equalityFn) I think it would be easier to type. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I usually always need 'shallow' for comparison, but i can't figure out how to make correctly typed middleware.
I have been using enhancer function with zustand 2:
But now updating to zustand 3, i cant figure out how to type it and is it correct way to do it?
Maybe it should be done with middleware ?
Can someone help ?
Beta Was this translation helpful? Give feedback.
All reactions