#Will @xstate/immer be updated to the single argument pattern for v5?

1 messages · Page 1 of 1 (latest)

sour compass
#

Currently @xstate/immer takes a update function with the old signature.

(context, event) => {}

Will it be updated to take the new signature for v5?

({ context, event }) => {}
quasi burrow
#

Are you using it heavily? Wondering if some of the userland solutions in that thread can satisfy your use-cases

sour compass
#

Oh that's a good call! Yeah we are using it pretty heavily because my team is all juniors and complex immutable state composition gets really ugly and confusing. So much easier to set properties on a nested draft object. I'll swap us over to manual usage. Thanks for that.

#

This also avoids TONS of typescript annoyance since the built in assign plays nicer.