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
Chat
Members
Info
down-caret

Experimenting with putting XState in charge of React rather than vice versa.

I'm experimenting with an xstate-first approach here. The app starts with a state machine that in it's context holds the rendered view. Components are rendered using invoked callbacks (see the childView function). • The machine responds to a RENDER event with a payload of the…

thumbsup
0
message-simple
6

Best way to access child service (created on later state change) in vue…

Hey So I have a root machine which then invokes a child machine when the state changes. If I have a single component what’s the “right” way to access the child service? Assuming that the component was already created and mounted. The state change which resulted in the child…

thumbsup
0
message-simple
7

machine vs createMachine

what is the difference?

thumbsup
0
message-simple
1

Is there a way to clear an interval without transitioning to another state?

I realize I basically have a state for the sole purpose of being able to clear an interval. Because the function returned from 'src' will be called only when the state transitions to a new one, I had to create a state which really represents nothing. Is there a better way to…

thumbsup
0
message-simple
2

Is there a difference between `sendUpdate` and `sendParent`?

... when working with spawned children that are not synchronized with the parent, there are a few ways to send messages from the child to the parent. sendUpdate is new as of v4.7. What is the intended distinction compared to sendParent?

thumbsup
0
message-simple
1

Should states be past-tense? Modelling help....

Hey, I'm going back and forth on modelling this machine and am wondering if perhaps my mental model is incorrect. Best explained with a simple example... …

thumbsup
1
message-simple
7

Eventless vs transient transition are they same ?

according to the examples on the Docs, it seems no different but the definitions are not? can someone remove the confusion?

thumbsup
0
message-simple
2

Can't find asEffect action

I can't find the asEffect action in the xstate and react packages.

thumbsup
0
message-simple
3

Detecting if parent present

Hi Everyone, First off, thank you to the authors and contributors for such an interesting and well-crafted library. I really am blown away with the design of xstate. It's really awesome, excited to show coworkers in a future talk. I have a question regarding how to check if a…

thumbsup
1
message-simple
2

xstate-codegen - gives you 100% type safety in XState

XState is the bomb, but I kept getting scared that I wasn't getting 100% type safety when using it with TS and React. This codegen package gives you full type safety over everything: actions, guards, services etc. https://twitter.com/mpocock1/status/1288782560621928448 Looking…

thumbsup
9
message-simple
16