Logos DX
    Preparing search index...

    Type Parameters

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Wire machines together declaratively. When the source machine enters the specified state, sends an event to the target machine.

      Returns a cleanup function to tear down the connection.

      Parameters

      Returns Cleanup

      hub.connect({
      from: 'auth',
      enters: 'loggedOut',
      to: 'checkout',
      send: 'RESET',
      })
    • Returns a machine by key, fully typed.

      Type Parameters

      • K extends string | number | symbol

      Parameters

      • key: K

      Returns T[K]

      const auth = hub.get('auth')
      auth.send('LOGIN', { user: 'admin' })