github statelyai/xstate xstate@6.0.0-alpha.63

pre-release3 hours ago

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);

Don't miss a new xstate release

NewReleases is sending notifications on new releases.