Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Client Side Reactive Programming Using RxJS

July 25, 2016

Client Side Reactive Programming Using RxJS


July 25, 2016

More Decks by r31gN_

Other Decks in Technology


  1. Client-side reactive programming (using RxJS)

  2. Current state of UIs • Extremely complex • Full of

    async events, client/server communication • UIs are always composed based on a state • State is hard to reason about
  3. Imperative programming

  4. None
  5. User action UI Responds User action ….. Uses imperative programming

    Uses imperative programming UI Responds time (s)
  6. Caveats of IP • Isolates state from time • You

    don’t see the bigger picture • Mutable values
  7. Is there a way … ?

  8. Reactive programming

  9. – Andre Staltz “Reactive programming is programming with asynchronous data

  10. Streams • Sequence of ongoing events ordered in time •

    Cheap, ubiquitous • Allow you to react to new data • Think event busses, typical click events, etc.
  11. But in RP …

  12. None
  13. Demo time with RxJS

  14. When to use RxJS • Orchestrate event-based computations • Deal

    with async data • Complex UIs with lots of user interaction
  15. Thank you! @r31gN_ https://github.com/r31gN/rxjs-demo-presentation