ability to set reviveContext
while providing higher-level restoreSnapshot logic
#5227
Unanswered
christophe-g
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'll start with my use case:
I persist context that holds a (or multiple) firebase reference object. When context is restored,
reviveContext
loops through this complex Object (which holds refs to the Window object ...).This is opening the door to more serious issues (see #5228).
I would like to have a way to act on
reviveContext
. For instance, skipping the recursivity when it reaches a firestore document reference:The problem is that it is not possible to pass on a
restoreSnapshot
higher-level logic method as most of the methods used there are not exported (createMachineSnapshot
,getAllStateNodes
,getStateNodes
, ...). As I would need the same restoring logic (e.g. restoring snapshotChildren), I would need to call these.Now back to the feature request :
restoreSnapshot
, orreviveContext
function while restoring state ?Beta Was this translation helpful? Give feedback.
All reactions