-
-
Notifications
You must be signed in to change notification settings - Fork 63
Clicking GO multiple times and wait for 2 secs - doesn't advance #6
Comments
Interesting, can't seem to repeat this. What device/browser are you on? |
Just dug into this and the problem is tricky, although very interesting. If you click one of the yellow When the machine is in So afaik this leads to two questions:
btw. @mattpocock, really nice modelling of sending an event with a payload via mdx! 🤓 |
A really simple but working rewrite is
though IMO this is really bad, because it hides the fact that no action was executed! What would be the expected behavior if no action was defined? And one more question: The visualizer does not show the action in the context. Is this expected behavior, because it is a function @davidkpiano? |
Aha! It's one of these. OK, my plan here is to have something like this in the MDX file:
This means that the events on the sidebar will have something to inherit so they won't be firing just a dumb event. Thanks for the digging @bemayr! |
@iangregsondev @bemayr Does this work for you? https://xstate-catalogue-git-mattpocock-issue6-mattpocock.vercel.app |
Nice idea! I like the defaultEvents implementation and now the Sidebar works as expected! 👏 The only problem left over now is that clicking on an event in the visualizer does not work as expected, and I am afraid that this will confuse/frighten people. :/ |
Yeah, that's interesting - that feels like something that could be merged into |
Perfect, thank you! |
Hi,
Tried this
https://xstate-catalogue.com/machines/debounce
in chrome, clicking the yellow GO event multiple times - then it goes to debouncing.... if I stop pressing the GO then it doesn't seem to advance.
Maybe I am doing it wrong ?
The text was updated successfully, but these errors were encountered: