vapor-chamber API reference - v1.16.0
    Preparing search index...

    Function dispatchFrom

    • Inverse direction: convert an Observable into a bus dispatch stream. Each value emitted by the source is dispatched as the given action. Useful for piping RxJS operator output back into the bus.

      Returns the Subscription so you can unsubscribe; the bus dispatch is fire-and-forget per emitted value.

      Type Parameters

      • T

      Parameters

      Returns Subscription

      import { interval } from 'rxjs';
      import { dispatchFrom } from 'vapor-chamber/observable';

      dispatchFrom(bus, 'tick', interval); // tick every 1s