I have not really grasped why state machines are a big deal. (If it is)
Thanks and congrats for hitting the first page!
I have not really grasped why state machines are a big deal. (If it is)
Thanks and congrats for hitting the first page!
I'm working on articles for using XState in various frameworks, such as React, Vue, Angular, etc. It's already being used in production in places like vaultproject.io, tipe.io, serviceworkies.com, and more.
You can use the interpreter or create your own. An XState machine instance has a pure .transition() method that takes the current state and event, and returns the next state (+ actions, etc.). This can be used anywhere you would determine the next state of your application (or any of your app's constituent parts).
If so, how would the implementation differ from store and reducers?
But to be fair, I asked this question a year ago and the majority of front-end developers were unfamiliar with state machines: https://twitter.com/DavidKPiano/status/880878305502785539 I'm glad you're not, but that's not representative of the community.
Much of what a typical React + Redux app does is implementing a state machine.