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 - Eventless Transitions to the child state

Hello everyone, I'm learning XState and I stucked. I hope someone can point me what I'm doing wrong. My machine have 2 states: 'opened' and 'closed'. 'opened' has 2 child states beforeSubmit and afterSubmit. I want to redirect to one of these child when the machine enters opened…

thumbsup
0
message-simple
2

problem setting initial context data with xstate

Hi XSTATE experts, I created an XState as a skeleton template then extend it using withContext and withConfig to build it up. I failed using withContext to set data into context objet nor able to add new data to context object. No TS compile errors but run time showed context…

thumbsup
0
message-simple
5

typescript errors when defining invoke on local system but not sandbox

Hi experts, I am having typescript errors when adding invoke: {} to my state machine. However the same codes worked well on code sandbox but not my local nodejs with visual code editor. simple codes like this: const x = Machine({ …

thumbsup
0
message-simple
13

xState newbie struggles accessing state meta data

Hi there... I setup a FSM with all states, actions, guards, context and state level meta defined following tutorial from state doc page. I started Machine with interpret and it started fine. Events were sent and confirmed states transitioning accordingly. I struggled to access…

thumbsup
0
message-simple
13

https://x-state-introduction.now.sh/

Hi, I've been trying to convince my company to adopt state machines, and I made this site for a presentation I did last month, It contains Slide deck and a simple example. Notice, the LINK in top left. I've also been playing with the vis in a local environment and have been…

thumbsup
2
message-simple
1

Hello! Newbie question around passing/sharing context

Hello everyone (and thanks David, Mateusz, and the whole community for the brilliant work!) As a learning exercise, I'm trying to architect/build a minimal Trello clone, using xstate for state management, firebase firestore for realitme data and React. …

thumbsup
0
message-simple
6

cheers :-)

hello, this is my first posting. I would like to discuss an idea and it includes some code snippets and some thoughts around it. It's about XState and GraphQL or rather cool properties both have that I think would be awesome to merge. How do I use spectrum for that - including…

thumbsup
2
message-simple
1

Hi! Newbie question about testing a state machine

Are tests written inside the machine itself? Im looking at the example here: https://xstate.js.org/docs/packages/xstate-test/#quick-start That example has a page object used by puppeteer. It looks like its mixing app code and test code together. …

thumbsup
0
message-simple
12

Hi.

I'm new. Is there any place to find a comparison of the performance and volume of the total bundle compared to Redux

thumbsup
0
message-simple
2

Hi there! Can you check out this simple machine of mobile app init and give me…

https://xstate.js.org/viz/?gist=b37ec3f3a7e281f8d86a7e385921b76e

thumbsup
0
message-simple
1