MicheleBertoli / react-automata

A state machine abstraction for React
MIT License
1.34k stars 60 forks source link

[WIP] Fixes actions on same-state transitions #75

Open good-idea opened 6 years ago

good-idea commented 6 years ago

Just giving this a shot. This makes a 'fix' to work as I'd expect (see #74) but now there is a failing test.

Needs (from my perspective):

[ ] machineDidUpdate utility probably needs to be improved to better detect changes [ ] Transitioning to a nonexistent state (transition(FOO)) should act as it did before.

Let me know if this is helpful, I'm happy to continue working on this. If not, I can just call transition with an empty object.

MicheleBertoli commented 6 years ago

Ping @good-idea :)