Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

untitled notebook

node v10.24.1
version: 1.0.1
endpointsharetweet
const { Machine } = require("xstate") const { getSimplePaths, getShortestPaths } = require('@xstate/graph') const machine = Machine({ id: 'feedback', initial: 'question', states: { question: { on: { CLICK_GOOD: 'thanks', CLICK_BAD: 'form', CLOSE: 'closed', ESC: 'closed' } }, form: { on: { SUBMIT: 'thanks', CLOSE: 'closed', ESC: 'closed' } }, thanks: { on: { CLOSE: 'closed', ESC: 'closed' } }, closed: { type: 'final' } } }); getSimplePaths(machine)['\"thanks\"'].paths.map((path) => { return path.map(({event}) => event.type) })
Loading…

no comments

    sign in to comment