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 test

Hi! Looking at xstate test, I kept asking how it compares to property based testing. For example https://github.com/dubzzz/fast-check . I was hoping to get your thoughts on the topic.

thumbsup
0
message-simple
0

XState: Submachines vs. Transient States w/ Guards

I've got a workflow to implement that has a lot of states that simply get skipped if certain conditions are true. It seems like there are two ways to model this: One way would set them all up as sequential submachines, each with one transient entrance state, and an advance to…

thumbsup
0
message-simple
5

🚀 XState Wish List

As we're working on releasing 4.7 and moving towards 5.0 this holiday season, I wanted to ask all of you: What is on your XState wish list? Do you wish there was a different syntax for defining machines? Do you wish there were built-in patterns? …

thumbsup
0
message-simple
1

XState: dependency injection to specify targets?

I'm building an app that needs to be reconfigurable such that a few sub-machines have multiple outlets (not just a single onDone) and I need to be able to specify their targets via dependency injection so that they can vary based on which parent machine the sub-machine is…

thumbsup
1
message-simple
2

Feedback request: Work-In-Progress parallel state machine

Hi folks, I'm thinking thru my first xstate design for an embedded podcast player, and I'm trying to work out how to send event between parallel state nodes. https://xstate.js.org/viz/?gist=6c6221acbacdd94c1c350f2debd819d7 Here's what I'm trying to do: …

thumbsup
0
message-simple
1

Decoupling data from machines

Hello! Wondering how best to deal with decoupling API calls & whatnot from machines within the context of React. As an example, I have a pretty complicated screen for recording and uploading videos. xstate was the perfect way to model the interactions & states of the screen, and…

thumbsup
0
message-simple
1

Invoking services in actors and notifying the parent

Hi! I'm playing around with xstate and struggling a little bit trying to implement this functionality. Could you guys point me in the right direction? 1) Dynamically spawn two ChildMachines as actors of ParentMachine. 2) Send an event to ParentMachine that'll invoke…

thumbsup
0
message-simple
2

Using the actor model for UI development

Just found this master thesis: "Uselets: UIs using Actors as an Abstraction for Composable Communicating Components", it looks interesting, please, let me know your opinions about it. I was searching for some literature about using the actor model in UI development. If you have…

thumbsup
5
message-simple
2

Hi! How would you model a "stoppable traffic-light"?

I am struggling with implementing a traffic light that is stoppable for a undefined time. Simple traffic light is easy, but i cant think of how to model "stay in phase x untill event e happens". Can someone point me in the right direction?

thumbsup
0
message-simple
5

Pattern for accessing invoked machines in React components?

I'm trying to do something fairly simple (or at least I thought), but can't figure out how. I've got several machines (one for each of my application screens) + one "main" machine that invokes them. All I want to do is to: …

thumbsup
0
message-simple
3