Reactive Programming Paradigm (Dataflow)
  • type of declarative programming paradigm concerned with data streams and the propagation of change
  • with this paradigm, it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow

Example

In an imperative programming setting:

  • 𝐴 = 𝐵 + 𝐶 would mean that 𝐴 is being assigned the result of 𝐵 + 𝐶 in the instant the expression is evaluated, and later, the values of 𝐵 and 𝐶 can be changed with no effect on the value of 𝐴

In reactive programming:

  • the value of 𝐴 is automatically updated whenever the values of 𝐵 or 𝐶 change, without the program having to re-execute the statement 𝐴 = 𝐵 + 𝐶 to determine the presently assigned value of 𝐴

Comparisons With Other Paradigms