Open ursusursus opened 5 years ago
Ok I have looked at the way you guys use it in Scarlet
So, you are baking the statemachine inside StateManager, which then you can run those sideffects before transitions, great
However, this messes up testing, as you can only test StateManager, and statemachine become implmentation details, which is maybe okay
But you lose ability to set initialState, unless you pass it in via StateManager ctor, which is bad, since youre leaking your implementation detail to call sites
So...I'd like your guidance on this please
Hi, I wanna bounce of you a design question, since im trying to rewrite "implicit" state machine to explicit one
Usually the code looks like this
What I usually see is people having transition function, which according to input action changes state, but however it would do so before doSomething is ran, to me which is a problem since currentState will be observable, and subscribers expect doSomething to have ran if state is Quax
Do I need some PRE + POST_state pairs or something? Seems weird for synchronous code
What would be your solution?