.setState(produce cant infer type #3068
Unanswered
mordv
asked this question in
Bug report
Replies: 2 comments 2 replies
-
@mordv you should use immer middleware -> https://zustand.docs.pmnd.rs/middlewares/immer |
Beta Was this translation helpful? Give feedback.
2 replies
-
Sounds like a good workaround. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug Description
Can't infer type. d is any.
setState(s => produce(s, (d) => {
works thoughReproduction Link
https://codesandbox.io/p/sandbox/htc7z3
Beta Was this translation helpful? Give feedback.
All reactions