JSPM

  • Created
  • Published
  • Downloads 57821
  • Score
    100M100P100Q213033F
  • License MIT

XState graph utilities

Package Exports

  • @xstate/graph
  • @xstate/graph/package.json

Readme

@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);