I have been doing some research into reactive programming recently and I'm finding it hard to find a good description of the difference between Reactive and Functional-Reactive.
Is it simply that the reactive programming is implemented using functional methods/paradigms as opposed to using declarative or OO paradigms?
React in itself is not fully functional, nor is it fully reactive. But it is inspired by some of the concepts behind FRP. Functional components for instance are pure functions with respect to their props. And they are reactive to prop or state changes.
Reactive programming describes a design paradigm that relies on asynchronous programming logic to handle real-time updates to otherwise static content. It provides an efficient means -- the use of automated data streams -- to handle data updates to content whenever a user makes an inquiry.
Imperative programming means you are responsible for pulling an event off of a queue. Reactive programming means you register a callback and a framework is responsible for calling your callback correctly. In most non-JavaScript languages, imperative programming is the de facto standard.
FRP is the combination of functional and reactive paradigms. In other words, it is reacting to data streams using the functional paradigm. FRP is not a utility or a library — it changes the way you architect your applications and the way you think about your applications.
One can use Functional programming or Reactive programming. It depends on the application you want to build and its requirements. Functional programming paradigm is built upon the idea that everything is a pure function. Reactive programming paradigm is built upon the idea that everything is a stream observer and observable philosophy.
Reactive programming is the practice of programming with asynchronous data streams or event streams. An event stream can be anything like keyboard inputs, button taps, gestures, GPS location updates, accelerometer, and iBeacon. You can listen to a stream and react to it accordingly.
Functional Reactive Programming (FRP) is a specific programming model with a specific semantics. (Actually, there are two variants, which are sometimes called "classic FRP" and "arrow FRP".) I've given a summary in an answer to "What is (functional) reactive programming?" .
When people talk about “reactive” in the context of software development and design, they generally mean one of three things: 1 Reactive systems (architecture and design) 2 Reactive programming (declarative event-based) 3 Functional reactive programming (FRP)
Functional Reactive Programming (FRP) is a specific programming model with a specific semantics. (Actually, there are two variants, which are sometimes called "classic FRP" and "arrow FRP".) I've given a summary in an answer to "What is (functional) reactive programming?". As I said there, the two key properties for me have always been (a) precise & simple denotation and (b) continuous time. I regret that this model came to be called "functional reactive programming", for a few reasons:
For descriptiveness & accuracy, I prefer the term "denotative continuous-time programming" (suggested by Jake McArthur in a conversation a while back) over "functional reactive programming".
I wrote a very short piece on the origin of FRP in the blog post Early inspirations and new directions in functional reactive programming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With