-
-
Notifications
You must be signed in to change notification settings - Fork 62
New Feature Idea 💡 - Reset the Machine #39
base: master
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mattpocock/xstate-catalogue/BoaNfJLf3FA6CzTEddPmgRySRpmG |
I've got three [
|
@bemayr Good idea! This is for sure an important feature. I'm not seeing it working on this link: Will take a look at the code at some point, on my todo list |
Thanks for your answer Matt and looking into this!
What exactly is not working for you there? Because for me the button is there and it resets the machine...? 🤔 |
After working with the Catalogue quite a bit I encountered some situations where I wanted to reset the state machine. If I am the only one not being satisfied by hitting F5 in this case then please ignore and close this PR 😉!
During research on how to implement this I stumbled upon @mattpocock's comment regarding this on discord asking what is the best way to restart a service.
Implementing took a little while because of statelyai/xstate#2084, which (1) has a workaround for now (that's the initial empty contexts) and (2) will be integrated in an upcoming version of @xstate/react.