Skip to content

xstate@6.0.0-alpha.63

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 29 Sep 23:28
· 9 commits to main since this release
19fe6bf

Minor Changes

  • d6dbf41: Add experimental execution.restore(persistedSnapshot) to xstate/durable for
    resuming checkpoints without sending a synthetic event or replaying entry
    actions. Execute the returned effects to resume active embedded children and
    pending timers. Restored child startup uses the host adapter, including nested
    children. Timers with a persisted wall-clock start keep their original deadline,
    including time spent waiting to execute effects or starting children.

    const execution = createDurable(machine, {
      ...adapter,
      transitionIndex: checkpoint.nextTransitionIndex
    });
    const [snapshot, effects] = execution.restore(checkpoint.snapshot);
    await execution.executeEffects(effects);