Skip to Content

emit Method

Emits the specified value to all subscribers currently listening to the emitter. It is used to trigger reactive updates or actions in response to the emitted value

@param value: T
The value to be emitted to all subscribers

@returns this
The instance of the emitter, allowing for method chaining

API

emit(value: T): this;

Example

import {emitter} from '@bitfiber/rx'; const launch = emitter<number>(); // Emits a value to its subscribers, linked reactive sources, and triggers its own taps and effects launch.emit(7);
Last updated on