DEV Community


It is unclear where React is heading

tomaszs2 profile image Tomasz Smykowski ・2 min read

Facebook advocates for using functions, because, like it seems, they are easier to understand than objects essentially advocating for dropping object-oriented programming. With growing adoption of React Hooks the trend becomes even more interesting experiment to watch.

Because, even React Hooks can be described as a great solution for some problems - these problems occurred because Facebook rejects object-oriented programming.

It makes React Hooks nothing more than useful, but a hack to prove React can live without objects. Life that is easier than before, but also a life introducing some completely new, not systematic rules specific only to React, a library that branches out from the main root, and going into direction of its own.

Time will show if that risk was worth taking, and since React adoption is so wide, we all have to keep the finger crossed that it is.

As you may notice I am critical of the approach taken by social media giant. But I have to accept React Hooks is the only solution Facebook provided for problems it created, and welcome it with open hands as it is.

But still if it comes to almost every solution, no matter who builds it, there is a technical and marketing aspects that have to be separated. Given React Hooks - it solves a problem and is hailed by Facebook as the next big thing.

If we look at it technically, and from wider perspective - it is a solution of a problem that almost nowhere else exists. The head-to-head competitor of React - Angular does not need Angular Hooks.

A wide range of problems React solves with hooks does not exist in Angular for a specific reason. Angular did not reject object-oriented programming. With a dependency injection design pattern, and services, Angular does not have problems that require hooks.

Facebook's team designing React rejection of core programming concepts as for now does not impact development so much. But hook after hook, perspective for a development of the library seems to narrow down. With such wide adoption, there is no way back unfortunately. Facebook has to prove React can solve problems it creates.

Domination in frontend development is something Facebook probably wants to maintain. In this fast-paced race between the biggest corporations social media giant has a great power to change programmers minds including throwing out decades worth of programming research.

But at some point of time people will start to ask if it is worth to maintain an odd library. Actually they ask it nowadays. Some choose to go with Vue.js - an early state library that promises to be something a better than React, but still not definitely competing with fully featured frameworks like Ember or Angular.

Some are giving a try with Angular, or Ember just to discover they don't have to worry about whole sets of problems presentation libraries introduce.

For Facebook, it means it can still try to sell React, introduce something new - a framework, or just leave the race. Most likely, the pressure from competitors will help Facebook reevaluate and improve it's open source offering.

Discussion (3)

anks333 profile image
Ankit Kumar

true, OOP is not the entire world. people need to understand there are various paradigm, react's hooks are more of FP

taylorwebk profile image

Yes, let's use OOP in front-end because JS supports it natively and obviously all of the top front-end frameworks are using it.

Forem Open with the Forem app