DEV Community

Cover image for Start Using React.js

Start Using React.js

Michael Gee on September 22, 2020

This post is a response to the post that got some traction last week Stop Using React. I feel like this post was a bit misguiding because it lists...
Collapse
 
thefern profile image
Fernando B 🚀

That react post is an example of pure negativity. If we go around and look at everything negative in life we'll have a 30,000 page book. If you personally think something isn't worth using, then don't use it. Saying is made by those people is heavily biased, and not really a fact. The slow point was really the only fact in that post.

Collapse
 
michaelgee profile image
Michael Gee

I agree although I try not to respond to negativity with negativity.

Like you said he has a valid point about performance but what bothered me is that there were no alternatives, improvements, or constructive feedback in the post.

Yes, React comes with costs but what do you gain from it? That is the question I try to answer here and really only scraped the surface responding to the opposing post.

Collapse
 
akhalinem profile image
Abror Khalilov

Totally agree with you.

Collapse
 
amt8u profile image
amt8u

Just read both the posts. Here are my two cents on the topic.

Every framework/library has its own place. Every thing is there to solve specific problem. Its all about the use case. People have to understand not every website is made for public. Web apps are everywhere now. Many products are just web apps intended to be consumed by only a handful of people.
Intranet applications like system monitoring, user management, employee cms, admin dashboards with many graphs and user preferences. They dont need caching and probably are not meant for mobile devices.

Of course you can build anything using just the server but frontend frameworks make it easy. Single page apps serve a purpose.

You need to figure out what suits your requirement. And of course thats not an easy task. Thats where experience comes in. You need to know the design patterns that framework follows.

Also to add one more thing. React or similar frameworks are not made for creating todo apps or login forms. You will see the potential difference only when your apps grows to a certain scale. Until then it will be an overhead only.

So just dont blindly start using react coz its there. Analyze if you really need it.

Collapse
 
michaelgee profile image
Michael Gee

I couldn't agree more, I am not here advocating "React is the answer" because that would be equally as ignorant as telling people to just stop using it completely.

React is in the title because obviously it is responding to a post that mentions it directly and I have experience with using it personally, although some of the points I made can be directly applied to the other major JS framework/library options.

Collapse
 
amt8u profile image
amt8u

Got you:-) To add one more point, React is not easy. Just for example, its been months I having been using it, but I still encounter this almost daily - Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment; No I want a cup of tea:-D

What I want to highlight is that there is a learning curve associated with every framework. And there is no such thing like learn once and write forever. Need to constantly learn as the tech evolves.

Collapse
 
akhalinem profile image
Abror Khalilov

You are right

Collapse
 
michaelgee profile image
Michael Gee

haha yea I agree. The three guarantees in life are death, taxes, and developers arguing over the technologies they advocate for.

the purpose of this post is just to provide an opposing perspective and not "fight" with anyone 😄

Collapse
 
markohologram profile image
Marko A

I feel like this post was a bit misguiding because it lists problems but no real solutions or alternatives.

I agree with this one 100%. I would have loved to see more solutions offered to these problems that the author listed.

Also, there was one great comment that I saw that said on YouTube regarding this:

To be fair, his argument is more like anti-javascript in general and React is just for clickbait

I would also agree with that comment. I don't mean to attack anyone, but that title could have been "Stop using Angular/Vue/Svelte/Ember/Aurelia/...". It's just that React brings a lot of attention (clicks).

Collapse
 
michaelgee profile image
Michael Gee

I agree, but really what is an ideal alternative to even the other major frameworks?

As I mentioned in the post I LOVED the idea of #UseThePlatform as a replacement to shipping these frameworks only to be met with frustration in development.

Not only a lack of solutions to common problems (external library support) but also the lack of community aka googling answers to commonly found problems/bugs in development.

I would much rather ship something to production that has a few performance flaws to later be optimized than delaying the release for months trying to find what I can use to replace it.

Collapse
 
markohologram profile image
Marko A

I agree with you completely. There are probably alternatives, but we go into "creating your own framework" territory, which is ridiculous if you need to create an app and ship it. Framework has thousands of developer hours invested into it, that provides a lot of value.

I didn't mean to attack you or anything, what I meant was that the author of that article should have listed more solutions, not that you didn't offer them in your article.

Thread Thread
 
michaelgee profile image
Michael Gee

Oh no, I didn't take it like that at all. I was just giving my 2 cents on the fact that the "Stop Using" post was maybe steering people down a road I've traveled and experienced a lot of frustration with.

React has saved me countless hours in time and energy both in my personal & professional projects so I felt a strong need to post (some of) the benefits you gain from using it.

Collapse
 
badpractice profile image
Bad Practice

You mean where people still try to drag others for using PHP? 😒

Collapse
 
dantighe profile image
Dan Tighe • Edited

Whats wrong with PHP? I thought you guys were discussing front end anyway

Collapse
 
ishansrivastava profile image
Ishan Srivastava

Not a fan of php myself, but at the moment : mark (1.1) which is a php7.4 framework is the fastest.
Rise of the dead ??
github.com/the-benchmarker/web-fra...

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

React is amazing, this negativity comes mostly from people who where not able to wrap their head around jsx, but in fact it is easy and makes only sense because creating elements is a core feature in javascript itself which is also the reason that you have curly braces in you jsx, onClick and so on .... because it is a js function and functions have curly braces. I think the way react is built is the right way for now and even the web itself has learned from it and I think we will see html itself getting closer to the react way. Everyone is talking about seperation in vue and so on, but look at vue you need to register components and go houndres of times up and down to create your components what react offers are for me really components create a function add some logic and return the markup it is amazing, and you can pass even components as props which you cannot do in vue or other frameworks.

Collapse
 
tirthaguha profile image
Tirtha Guha

Yeah, agree, that application didn't make much sense. Probably the poor guy couldn't get his head around JSX and vented out.

Collapse
 
yoursunny profile image
Junxiao Shi

I use Preact. It's basically React without the baggage.

Collapse
 
madza profile image
Madza

Hahah, a week ago I saw 'Stop using React' 👀😃

Collapse
 
jsphwllng profile image
joseph

well now i dont know what to think

Collapse
 
shroomlife profile image
shroomlife 🍄

My advice: Go the Vue way instead. #StopUsingReact

Collapse
 
kitarp29 profile image
Pratik Singh

Could this be more accurate?😂

Collapse
 
andrewbaisden profile image
Andrew Baisden

Github starts as of 13/10/2020

Vue: 174k
React: 157k
Angular: 66.7k
Svelte: 37.6k

React and Angular still have more jobs available for them though.

Collapse
 
ikorogodstime profile image
IkoroGodstime

Well I don't really care, honestly I just use what I'm comfortable in and what does the job. First of it was react ( if it's a framework or a library).