Skip to content

How do you recommend handling "sticky" states for returning workflows? #668

Answered by rjrjr
zoltish asked this question in Q&A
Discussion options

You must be logged in to vote

Your assumption is correct. Snapshots only come into play on the very first render pass, and are intended for reviving the entire tree -- say in a new process.

What I've done in situations like this is have C provide a continuation object as output (could be its entire state object, could be just enough info to resume), and accept the same as an optional part of its props, or as a constructor argument for its factory. This would require the parent of A to be in on the game. C emits to A emits to root, and root kicks off B w/the required info to keep C going.

Another possibility is for root to run all three of A, B and C directly, and stitch their renderings together. You could pass C's re…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zoltish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants