typescript-fsm icon indicating copy to clipboard operation
typescript-fsm copied to clipboard

Add context to FSM

Open carlos-verdes opened this issue 5 years ago • 0 comments

One of the main reasons to use a FSM is to protect the internal state of the model (the context). Normally the context is defined inside the FSM and is only accessible on transitions and onEnter/onExit executions (so you avoid side effects).

The only way to change the context of a FSM is sending an event to it.

carlos-verdes avatar Feb 18 '19 16:02 carlos-verdes