Questions tagged [xstate]

xstate is Javascript library for creating finite state machines and statecharts.

xstate is library for creating finite state machines and statecharts in JavaScript. Code and links to documentation found at https://github.com/davidkpiano/xstate

146 questions
0
votes
1 answer

Is there a TypeScript way of getting a child from a state in xState?

At the moment I do it like this: useActor((state as any).children.SomeChild); Since I'm not a big fan of "any" in TypeScript, is there another way of doing this?
romano
  • 1
  • 3
0
votes
2 answers

Is it posible to use a State Machine without using Conditional Statements on the Current State?

I want to use a state machine where the current state is mapped to the current screen. I am using svelte with xstate. Example with string as type: App.svelte