You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@reinoute
Haven't found a workaround that lets me recreate from a snapshot, however you could save every event your machine recieves and apply them to a blank actor.
@iamquoz I'm using XState in a serverless (stateless) backend, so on each request I need to restore the statemachine from the persisted state. I don't think replaying previous events is realistic for that use case, but I could be wrong...
XState version
XState version 5
Description
Sequence of events:
getPersistsedSnapshot
getPersistedSnapshot
on a new actorJSON.parse(JSON.serialize(...))
,getPersistedSnapshot
crashes when calling on a new actor.Expected result
Restored actors continue to be persistable
Actual result
Restored actors fail to persist their children
Reproduction
https://codesandbox.io/p/devbox/gracious-jerry-njrg8n
Additional context
xstate 5.18.1 (latest)
The text was updated successfully, but these errors were encountered: