HDD - Happiness Driven Development.
Over past few days I've been struggling to try to wedge #xstate library into my next project. I love the idea of state machines, I adore the tooling, I would love to see it everywhere for it's reasoning and academic cleanness.
But I decided to cut it out from the project and just use pure #EmberJS (tracked + services + ember-concurrency).
Resons? Selfish, really.
- EmberJS already has native tooling to solve vast amount of cases in way more elegant manner that xstate can.
- The interweaving of Ember & xstate just does not have great DX and I ended up writing tons of obscure code to do trivial mutations or derived state checks.
- While the xstate visual machine editor is cool, I find it lacking / buggy, so I end up going back to the code, which is, frankly, not easy to read.
- It might be the learning curve, but really what I can write in 5mins in pure EmberJS takes me hours in xstate (counting in fighting with TS gods).
Overall give xstate a try. State Machines feel like the correct way to go for things. But for me the DX of xstate is not there. I chose high HDD.