Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

haunted-robot

0.2.1 • Public • Published

haunted-robot

Haunted hooks for use with Robot.

See documentation on the website.

import { useMachine } from 'haunted-robot';
import { html, component } from 'haunted';
import { createMachine, state, transition } from 'robot3';
 
const machine = createMachine({
  one: state(
    transition('next', 'two')
  ),
  two: state()
});
 
function App() {
  const [current, send] = useMachine(machine);
  
  return html`
    <button type="button" @click=${() => send('next')}>
      State: ${current.name}
    </button>
  `;
}
 
customElements.define('my-app', component(App));

📚 Documentation

License

BSD-2-Clause

Install

npm i haunted-robot

DownloadsWeekly Downloads

0

Version

0.2.1

License

BSD-2-Clause

Unpacked Size

2.28 kB

Total Files

3

Last publish

Collaborators

  • avatar