JSPM

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

XState graph utilities

Package Exports

  • @xstate/graph
  • @xstate/graph/es/index.js
  • @xstate/graph/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@xstate/graph) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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