RX JS Basics
Rx JS is a declarative style of programming based on event emitters.
- Vinay Prajapati
We’ll Cover
 Functional Programming
 Reactive Programming
 What is RxJS
 Important Terminologies
 Observable types
 Subject
 Operators
Functional Programming
 Declarative Vs Imperative Programming
 Pure functions
 Higher Order / First class Functions
 Recursion
Reactive Programming
 follows declarative programming
paradigm
 Works on data streams
What is RX JS?
 Declarative style of programming
 Supports Functional Programming
 Event / event stream based
 Lazy push Based (Observable)
Important terminologies
 Observable
 Observer
 Subscription
 Operators (Instance Vs static)
 Subject
 Schedulers
Hands On
Observable Types
 Cold Observable
 Hot Observable
 Warm Observable
 Unicast / Plain Observable
 Multicast Observable
Subject
 - What is a Subject
 - Observer + Observable at the same time
 - Examples
Hands On
Operators
 What is Operator
 Creating an Operator
 Instance vs Static operator
 Quick review of some operators
Hands On
Thanks

Rx JS basics

Editor's Notes

  • #2 Quote – RX js is Lodash of event.
  • #5 While in reactive programming any change in value of b and c will update value of a
  • #6 Q – Difference between Pull Vs Push based systems? Promises are push based . May or may not return one value Observables push based. May return 0 to infinite values
  • #7 Observers are just objects with three callbacks, one for each type of notification that an Observable may deliver. Next, Error and Complete What is a Subscription? A Subscription is an object that represents a disposable resource, usually the execution of an Observable. Subject – Observable + Observer. Multicasts the value to multiple observers Few examples on same:- Creating Observable Creating an Observer Creating a subscription Closing a subscription Subject Skip schedulers as an excercise
  • #8 Observable, Observer, subscription, subscribing & Cancelling a subscription
  • #11 Observable, Observer, subscription, subscribing & Cancelling a subscription
  • #12 Operators - Operators are methods on the Observable type. When called, they do not change the existing Observable instance. Instead, they return a new Observable, whose subscription logic is based on the first Observable.
  • #13 Observable, Observer, subscription, subscribing & Cancelling a subscription
  • #14 Observable, Observer, subscription, subscribing & Cancelling a subscription