Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Reset simulation state on receiving xstate.disconnect #291

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

farskid
Copy link
Contributor

@farskid farskid commented Oct 7, 2021

This PR adds support for resetting the simulation state on receiving xstate.disconnect through the inspector client.
Following: statelyai/xstate#2720

@changeset-bot
Copy link

changeset-bot bot commented Oct 7, 2021

🦋 Changeset detected

Latest commit: 62ba3e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate-viz-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/statelyai/xstate-viz/76VoEMWtz3bQYMzjs7FQfm86wkgX
✅ Preview: https://xstate-viz-git-farskid-reset-simulation-on-xst-3a8251-statelyai.vercel.app

@@ -138,6 +138,9 @@ export const simulationMachine = simModel.createMachine(
}),
);
break;
case 'xstate.disconnect' as any:
sendBack(simModel.events['MACHINES.RESET']());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typecasting will be removed once statelyai/xstate#2720 is merged that adds the typings.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants