Novelty Plastic Moustache

    @xstate/inspect
    TypeScript icon, indicating that this package has built-in type declarations

    0.7.1 • Public • Published

    @xstate/inspect

    This package contains inspection tools for XState.

    Templates

    Inspector running from CodeSandbox

    Check out the XState + Vue Minute Timer + Viz example on CodeSandbox

    Installation

    1. Install with npm or yarn:
    npm install @xstate/inspect
    # or yarn add @xstate/inspect

    Via CDN

    <script src="https://unpkg.com/@xstate/inspect/dist/xstate-inspect.umd.min.js"></script>

    By using the global variable XStateInspect

    1. Import it at the beginning of your project, before any other code is called:
    import { inspect } from '@xstate/inspect';
    
    inspect({
      // options
      // url: 'https://stately.ai/viz?inspect', // (default)
      iframe: false // open in new window
    });
    1. Add { devTools: true } to any interpreted machines you want to visualize:
    import { interpret } from 'xstate';
    import { inspect } from '@xstate/inspect';
    // ...
    
    const service = interpret(someMachine, { devTools: true });
    service.start();

    Install

    npm i @xstate/inspect

    DownloadsWeekly Downloads

    117,052

    Version

    0.7.1

    License

    MIT

    Unpacked Size

    68.3 kB

    Total Files

    30

    Last publish

    Collaborators

    • xstate-release-bot
    • andarist
    • davidkpiano