3 ms·
Ha, I've been working on something similar recently and the big question is, do you want that state machine on the front end or the backend?
by 8note 3y ago
Ha, I've been working on something similar recently and the big question is, do you want that state machine on the front end or the backend?
- code_biologist 3y agoI think both are necessary in different circumstances. I use a simple litmus test: where does the state live to provide the best UX for my app if a user moves from their phone to a laptop and back again? If the state needs to persist across devices it it server side (though a frontend cache can make sense), eg: onboarding flow or "task wizard" state. Some UI interactions are much easier with state machines, but persisting state isn't a concern even across page refreshes, eg: complex animations or complex form validation states (especially validation that involves time or websockety things).