menu

Statecharts

Statecharts are a precise, visual way of modeling the behaviour of complex reactive systems. They describe how things work, and can help you get your code doing exactly what you want.

Channels
Team
Posts
Members
Info

XState Viz Tool: Method to prevent Overlap of Arrows on States

Is there any way in which we can avoid the overlaps of arrows and states in the Viz tool?

thumbsup
0
message-simple
0

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. …

thumbsup
0
message-simple
0

XState React: Pass machine state into child components

Hello guys, I'm finding a way to share machine state between mutiple components, I'm thinking about React Context API. Do you have any better solution?

thumbsup
0
message-simple
2

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…

thumbsup
0
message-simple
0

[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…

thumbsup
1
message-simple
0

[OT] Alternative way to visualize states :-)

Each State Perfectly Portrayed By One Photograph Happy Easter everyone!

thumbsup
0
message-simple
0

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…

thumbsup
0
message-simple
2

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…

thumbsup
0
message-simple
1

Can Statecharts handle NFA?

thumbsup
1
message-simple
1

Can we use coroutine to implement statecharts?

Coroutines are transformed into equivalent state machine in kotlin's implmentation. It occurs to me that can we use coroutine to solve the problems that Statecharts solves with hierarchy, parallelism and history?

thumbsup
0
message-simple
5