Detalhes do pacote

@xstate/graph

statelyai183.6kMIT3.0.4

XState graph utilities

state, machine, statechart, scxml

readme (leia-me)

@xstate/graph

This package contains graph algorithms and utilities for XState machines.

Quick start

  1. Install xstate and @xstate/graph:
npm install xstate @xstate/graph
  1. Import the graph utilities. Example:
import { createMachine } from 'xstate';
import { getSimplePaths } from '@xstate/graph';

const machine = createMachine(/* ... */);
const paths = getSimplePaths(machine);