Skip to content
Discussion options

You must be logged in to vote

Hey thanks for the kind words!

You can do actor.subscribe(snapshot => {/* … */}).

You can also use the inspect API for more fine-grained inspection:

// either on creation
const actor = createActor(machine, { inspect: (inspEv) => { … } });
// or after the fact
actor.system.inspect(inspEv => {  })

See the inspection docs here: https://stately.ai/docs/inspection.


Re: the bonus question, you can likely check that Object.keys(snapshot.children).length === 0, which indicates that no child actors are present/active.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by zacharyhansen
Comment options

You must be logged in to vote
1 reply
@zacharyhansen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants