xState v5: asynchronous call when actor start AND when an actor is restored (snapshot) #5121
Unanswered
florian-mollin-wanteeed
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to call an asynchronous function (maybe via an action) when a machine actor starts (from scratch (ie. not from a snapshot)) AND also when an actor starts from a snapshot ?
My use case: I need to initialize a background task just before the machine is launched (whether via a snapshot or not)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions