@xstate/graph
v3.0.0
Published
XState graph utilities
Downloads
140,182
Readme
@xstate/graph
This package contains graph algorithms and utilities for XState machines.
Quick start
- Install
xstate
and@xstate/graph
:
npm install xstate @xstate/graph
- Import the graph utilities. Example:
import { createMachine } from 'xstate';
import { getSimplePaths } from '@xstate/graph';
const machine = createMachine(/* ... */);
const paths = getSimplePaths(machine);