-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
When using the StateMachine.ctor for the use with external storage
public StateMachine(Func<TState> stateAccessor, Action<TState> stateMutator)
the stateAccessor-delegate gets called rather often. For example for a simple state transition the pattern looks like this:
Loading state
Loading state
Loading state
Saving state
Loading state
If I would naively attach some service calls or database operations this might cause some pain.
What I would suggest as a default behaviour is to load state via stateAccessor() just a single time on creation of the state machine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels