3 ms·
And it works! I learned a lot about preventing magic with this here: https://gameprogrammingpatterns.com/state.html https://gameprogrammingpatterns.com/state.ht
by _the_inflator 7y ago
And it works! I learned a lot about preventing magic with this here: https://gameprogrammingpatterns.com/state.html https://gameprogrammingpatterns.com/state.html
For me - and I mostly do frontend apps now - I always advise to go for state pattern instead of complex if/thens. Thanks to the aforementioned article.
- lzralbu 7y agoDoes Redux help with things like this?
- davidkpiano 7y agoIf you have enough discipline, sure. Finite state machine tools like XState are more strict about this.