While state machines used to be an obscure model for the front-end world, it has gained quite some traction lately, mostly thanks to XState. XState is a JavaScript state machine implementation created by Microsoft engineer David Khourshid. I met David at dotCSS 2019, where he talked about crafting stateful styles using finite state machines. During his talk, David asked: “is there a better way to model state for dynamic UIs?” After all, state is at the center of what we, front-end enginee...