BACK
ReferenceobserveOn
Reference · 81

observeOn

observeOn

rxjs.dev

Moves notification delivery onto a chosen Scheduler.

Signature

observeOn(scheduler: SchedulerLike, delay?: number): MonoTypeOperatorFunction

What it does

Doesn't change the source, but schedules next/error/complete on the scheduler. This affects when the subscriber receives them.

When to use

Breaking a synchronous chain, moving heavy delivery onto asyncScheduler, aligning a stream with animationFrameScheduler.

See also

subscribeOn, delay

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...