Skip to content

Instantly share code, notes, and snippets.

@nzoelle24
Created November 24, 2020 17:59
Show Gist options
  • Select an option

  • Save nzoelle24/7b63b7d6b293c27c20a7bc1a7848d34b to your computer and use it in GitHub Desktop.

Select an option

Save nzoelle24/7b63b7d6b293c27c20a7bc1a7848d34b to your computer and use it in GitHub Desktop.

Revisions

  1. nzoelle24 created this gist Nov 24, 2020.
    19 changes: 19 additions & 0 deletions machine.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    const machine = Machine({
    id: 'modalMachine',
    initial: 'closed',
    states: {
    closed: {
    on: {
    OPEN: {
    target: 'open'
    }
    }
    },
    open: {
    on: {
    CLOSE: 'closed'
    }
    }
    }
    });