Home

RxJS

RxJS is a library for composing asynchronous and event-based programs by using observable sequences. It is a JavaScript implementation of the Reactive Extensions (ReactiveX) standard. At its core are Observables, which represent streams of values that can emit items over time. Observers subscribe to observables to receive next values, errors, and completion signals. Observables are lazy and cancellable: execution starts when subscribed and can be stopped by unsubscribing.

RxJS provides a wide collection of operators to create, transform, filter, combine, and time-shift observable sequences.

Subjects are both an observable and an observer, allowing multicasting to multiple subscribers. Variants such as

RxJS is widely used in web development and is a core part of Angular, though it can

Operators
are
typically
used
through
a
pipe
mechanism,
enabling
readable,
declarative
data-flow
pipelines.
Common
creation
operators
include
of,
from,
fromEvent,
interval,
and
timer.
Transforming
operators
such
as
map,
filter,
and
tap,
and
combination
operators
such
as
merge,
concat,
zip,
combineLatest,
and
switchMap
enable
complex
asynchronous
logic.
BehaviorSubject,
ReplaySubject,
and
AsyncSubject
offer
different
replay
behavior
and
lifecycle
semantics.
Schedulers
provide
control
over
when
a
subscription
executes
and
on
which
execution
context,
aiding
in
controlling
concurrency
and
timing.
be
used
with
plain
JavaScript
or
TypeScript
and
with
other
frameworks.
It
originated
from
the
Reactive
Extensions
family
and
has
evolved
through
modern
versions.
The
library
is
open
source
under
the
MIT
license
and
emphasizes
composability,
declarative
data
flow,
and
robust
error
handling.
Marble
diagrams
are
often
used
to
illustrate
timing
in
testing
and
documentation.