DEV Community

Discussion on: What common programming concept has the wrong name?

Collapse
 
elmuerte profile image
Michiel Hendriks • Edited

React(ive).

As currently used a lot in web development. It comes from reactive programming which is a form of data flow programming, generally a declarative programming principle.

In reactive programming when you have an expression like a = b + c the value of a will change when b and c change. Not just when the above expression is evaluated.

This important characteristic is commonly not the case in what is currently often called reactive. While a lot of frameworks have support for pushing/pulling and reacting to model changes, it is hardly used to set up a reactive system. It does not go beyond showing new data, and not reacting to it.

So, the system does have reactive properties, it not reactive programming. We have been building systems with reactive properties for years before the current reactive trend showed up.

Collapse
 
guitarino profile image
Kirill Shestakov

That's a very good point. Unidirectional data flow is one way to achieve reactiveness and declarativeness, but it doesn't have to be like that. You can also write React in an imperative and non-reactive way, so why is it even called React?

I personally like a different reactive pattern more, namely, based on observed and computed variables (or independent and dependent variables if you want), similar maybe to MobX and the like.