How to prevent execution of entry actions after reading persisted state? #1732
-
Hi, after persisting a state: JSON.stringify(state) and then reading it: const previousState = State.create(JSON.parse(userState._state));
resolvedState = machine.resolveState(previousState);
interpret(machine).start(resolvedState); It runs the |
Beta Was this translation helpful? Give feedback.
Answered by
davidkpiano
Dec 16, 2020
Replies: 1 comment 8 replies
-
You can remove the actions from the resolved state: resolvedState.actions.length = 0; // remove actions
interpret(machine).start(resolvedState); |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
bennyKY
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can remove the actions from the resolved state: