BACK
Referencemulticast
Reference · 80

multicast

multicast

Deprecated
rxjs.dev

Low-level multicast via a Subject.

Signature

multicast(subjectOrSubjectFactory: Subject | (() => Subject)): OperatorFunction

What it does

Connects source to a Subject so several subscribers share one subscription to the source. Usually needs connect or refCount.

When to use

Supporting legacy code. In new code, share/connect is almost always simpler and safer.

Deprecated API

Marked deprecated in RxJS 7. In new code, use share or connect.

See also

share, connect, refCount

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