Reactive functional programming in Angular
The observer pattern stands at the core of what we know as reactive functional programming. The most basic implementation of a reactive functional script encompasses several concepts that we need to become familiar with:
- An observable
- An observer
- A timeline
- A stream of events
- A set of composable operators
Sound daunting? It really isn't. The big challenge here is to change our mindset and learn to think reactively, and that is the primary goal of this section.
To put it simply, we can just say that reactive programming entails applying asynchronous subscriptions and transformations to observable streams of events. Let's explain it through a more descriptive example.
Think about an interaction device such as a keyboard. It has keys that the user presses. Each one of those keystrokes triggers a specific keyboard event, such as keyUp. That event features a wide range of metadata, including—...