What is RxJS?
RxJS is a library for reactive programming using Observables, to make it easier to compose asynchronous or callback-based code.
ItIt provides one core type, the Observable, satellite types (Observer, Schedulers, Subjects) and operators inspired by Array#extras (map, filter, reduce, every, etc) to allow handling asynchronous events as collections. (RxJS Docs).
What is Observable?
Basically, Observable is a lazy Push collection of multiple values. They provide a continuous channel of communication in which multiple values of data can be emitted over time.
Angular widely use Observables like in HTTP service and the event system.
RxJS offers a number of functions that can be used to create observables.
- Using of function.
- Using from function
- Using fromEvent function
- Using interval function
Comments
Post a Comment