Chapter 6. FRP on the web

This chapter covers

  • Observables in RxJS
  • How to manage state in RxJS
  • RxJS examples
  • A glimpse of Kefir.js and Flapjax
  • Glitches/inconsistent handling of simultaneous events

FRP fits some problems better than others. User interfaces and networking are two event-based areas where it fits especially well. Not surprisingly, FRP is excellent for web applications.

RxJS—part of the Reactive Extensions suite—is a system widely used in web applications that has an FRP capability. In this chapter, we show how to use it for FRP by contrasting it against Sodium, which we’re treating as a model of true FRP.


Appendix C contains comparison charts for all the systems discussed here.

6.1. RxJS

Reactive ...

Get Functional Reactive Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.