3 ms·
I haven't used it in production yet, but I found it very interesting when experimenting with it a bit. One part I especially liked was how natural async actions
by fabian2k 6y ago
I haven't used it in production yet, but I found it very interesting when experimenting with it a bit. One part I especially liked was how natural async actions work in XState. You can just insert a function that returns a Promise and define which state transition happens on resolve or reject. With other state management libraries or native react state management this ended up in ad-hoc state machines anyway. Though for pure server-side state I found React Query to be a pretty good solution that covers this part well.
I'm not using it yet, but playing around with it did convince me that thinking in state machines or state charts is very helpful the moment the UI gets a bit more complex.