Stately
XState v6 alpha

Input and restored snapshots

Start Vue actors with input or persisted state.

Pass actor options as the second composable argument.

const { snapshot, send } = useActor(machine, {
  input: { userId },
  snapshot: persistedSnapshot
});

Input creates new initial state. A persisted snapshot restores earlier state.

Use input to start a profile actor for one userId. Use a restored snapshot to resume a checkout after a refresh.