XState: state call actions then transition to another state
Hello guys, I'm finding a solution for the below issue: This is my state When got event TOGGLE_SORT_LOCATION_NAME, I will action toggleSortLocationName, after toggleSortLocationName finished update context, I want to transition to getLocations. …
How to model a network request with statecharts events?
Say if we are doing a network query to fetch something from internet, and we have two states: "LOADING", and "DONE". Then after the response is received, a transition from "LOADING" to "DONE" will be triggered. My question is: should we model this transition with two events…
[Statechart theory] Towards composable statecharts
Programming with Statecharts is awesome; they bring a logical visualizable structure to reactive software such as UI, reducing technical debt and enabling performing changes and extensions with confidence. But, awesome as they are, they do not compose: You can not build a big…
Hi, does anyone have a good example of state chart for an optimistic update?
I need to control a toggle, which when clicked switches on (or off) and the UI optimistically updates to the new state, whilst also firing an API request to sync with the server. Ideally it would include the concept of loading (which prevents multiple clicks), API success, and…
XState sendParent throws exception if machine is not invoked
Hi, is it possible to have XState not throw an exception when a machine that's not invoked but has sendParent actions fires? I'm also open to better ways to do what I'm attempting to do. For further context: I have defined 2 machines that handles often paired components within…