Update context in mutable way with assign #1356
-
I wonder is there any possible pitfalls with using assign action in mutable way like in example below
I didn't found any mention of this usage in official documents but in first view it works fine. |
Beta Was this translation helpful? Give feedback.
Answered by
mattpocock
Aug 5, 2020
Replies: 1 comment 5 replies
-
You'll definitely get a kick out of using @xstate/immer. Importing assign from there will allow you to implement the above code as it is. |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll definitely get a kick out of using @xstate/immer. Importing assign from there will allow you to implement the above code as it is.