更新时间:2021-07-09 20:33:37
coverpage
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
What Does Being Reactive Mean?
The reactive paradigm
Why do I need it?
Installation of tools
Node.js
bacon.js
RxJS
Your first code using reactive programming
Summary
Reacting for the First Time
The bacon.js observables
Creating our first observable
Observables from DOM events (asEventStream)
Observables from promises (fromPromise)
Observable node event emitter (fromEvent)
Observables from an array (fromArray)
Observables from an array (sequentially)
Observables from an interval (interval)
Observables from other sources
Properties
Changes in an observable
Reacting to changes
Subscribing
Subscribing using the onValue() method
Subscribing using the log method
Subscribing using the assign method
Acting when an error occurs
Reading how an operator works
Transforming events using bacon.js
Reusing observables
Observables' lazy evaluation
A World Full of Changes - Reactive Extensions to the Rescue
RxJS observables
Difference between bacon.js and RxJS observables
Hot and cold observables
Installing RxJS
Creating an observable
Creating an observable from iterable objects
Creating an observable from a sequence factory
Creating an observable using range ()
Creating an observable using period of time
Creating an observable from callbacks
Creating an observable from a promise
Creating empty observables
Creating an observable from a single value
Creating an observable from a factory function
Creating an observable from arbitrary arguments
Creating an observable from an error
Creating observables from DOM events (or EventEmitter)
Creating an observable from an arbitrary source
Subscribing to changes (Observer)
RxJS Subjects
RxJS Disposable
RxJS Schedulers
Transforming Data - Map Filter and Reduce
Adding operators to observables
The map() operator
The flatMap() operator
The filter() operator
The reduce() operator
The World Changes Too Fast - Operators to Deal with Backpressure
What is backpressure?
Common strategies to deal with backpressure
Lossy strategies to deal with backpressure
The throttle() operator
The sample() operator
The debounce() operator
The pausable() observables
Loss-less operators to deal with backpressure
Buffering
The bufferWithCount() operator
The bufferWithTime() operator
The bufferWithTimeOrCount() operator
Pausable observables (with buffer)
Controlled observables
More ways to filter data
The first() operator
The take() operator
The takeLast() operator