|
|
|
|
|
by bearjaws
1917 days ago
|
|
Anyone with experience using finite state machines in production apps want to share their experience? I love the concept, but not sure how to implement a POC so my teams can see the value. We have a few areas that have a ton of dense business logic, and I think something like xState could be beneficial. |
|
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.