RxJS

Reactive Programming

  • Programming with asynchronous data streams
  • Tools to combine, create, and filter those streams

Lodash for events

Arrays Methods

  • .map()
  • .forEach()
  • .filter()
  • .reduce()

Asynchronous Data Streams

  • Asynchronous: Give a callback to run when results are returned
  • Data: Raw information such as objects, arrays, numbers, strings
  • Stream: Data/events as they're available over time

Promise

Observable

Stream Events

Each stream event can emit three different things:

  • Next: Value or data like an object
  • Error
  • Completed

Observable Examples

Stream === Observable

  • Value or data like an object
  • Error
  • Completed

Why Reactive Programming?

  • Apps are chatty
    • Liking a Tweet
    • Responding to a message
    • Adding a reaction to a post
  • Observables are everywhere
  • Powerful Operators
  • Easier to read

Angular Observables

  • Async Processing
  • HTTP
  • Forms and Validation
  • Routing
  • Custom Component Events
    • ‚Äč‚ÄčEventEmitter

Flip Flops: RxJS

By Chris Sevilleja

Flip Flops: RxJS

  • 401
Loading comments...

More from Chris Sevilleja