Socket
Socket
Sign inDemoInstall

@xstate/inspect

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xstate/inspect

XState inspection utilities


Version published
Weekly downloads
93K
decreased by-14.55%
Maintainers
3
Weekly downloads
 
Created
Source

@xstate/inspect

This package contains inspection tools for XState.

  • Read the full documentation in the XState docs.
  • Read our contribution guidelines.

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

Keywords

FAQs

Package last updated on 28 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc