The concept of reactive programming
There are a lot of different and valid ways that I could define reactive programming. It's a matter of perspective and focus. Which of them is the best definition? We're going to cover several in this section.
Perhaps, the most fundamental definition of reactive programming, at least in terms of what we need to think about to implement a reactive programming system, is that it's a publish/subscribe model of event handling. The following diagram illustrates the basic reactive event handling:

In the traditional nomenclature of reactive programming, there are observables and observers, which encapsulate the behavior of event publishers and event subscribers, respectively. In a reactive programming system, everything, or at least as much as possible, is an observable or an observer. So far, so good, but the publish/subscribe model by itself isn't really that exciting.
Reactive programming comes into its own when we recognize that an observable is conceptually...