Hacker News new | ask | show | jobs
by _qwfv 1918 days ago
XState is incredible when combined with something like Svelte. I've seen it used to power videogame UIs (huds, health bars, menus, etc.) for a AAA shooter.

The really nice thing about working with it is that all your components get much simpler about understanding when and how they should render. No longer are you trying to track state through some combination of variables or await statements, you are just asking, "Am I in this state? Great, I'll render." Double if you are managing animations or something else that takes wall clock time.

You also get an amazing visualizer and debug toolset where you can both see your app transition states, and inject the events to watch it transition states easily.

Would highly recommend checking out xstate in front end dev.