statelyai / xstate

Actor-based state management & orchestration for complex app logic.
https://stately.ai/docs
MIT License
26.51k stars 1.22k forks source link

CreateActor Requires Input with Snapshot #4915

Open thriftb opened 1 month ago

thriftb commented 1 month ago

Bug or feature request?

Bug

Description:

When creating an actor with a snapshot (createActor, restoring a persistent state), it requires an Input. Input shouldn't be necessary when creating an actor from a snapshot.

(Bug) Expected result:

Create an actor from a snapshot (without needing an input).

(Bug) Actual result:

Input is required when creating an actor from a snapshot. It will result in an error if no input is provided.

(Bug) Potential fix:

Make Input required only if a snapshot isn't provided for createActor.