DEV Community

Cover image for Is React Holding You Back?

Is React Holding You Back?

Jeff Puls on January 31, 2021

React.js is perhaps one of the most controversial topics among web developers in recent years. Some love it, some hate it, some can't live without ...
Collapse
 
boywithsilverwings profile image
Agney Menon

While React might be an overkill for a portfolio as your mentor mentioned (it depends! if you are more comfortable with React and code itself is more maintainable, is it an overkill?), it does not seem like React itself is the cause of your poor Lighthouse scores. It can surely hit 100 on all stats without changing the framework.

The size of NPM modules can be a bottleneck if you are running low on memory, but otherwise it does not relate itself to the website in anyway. But you can use features like Yarn PnP if the size of bother.

Collapse
 
jpuls profile image
Jeff Puls

I feel like it is definitely overkill (at least in the context of my site). Unless you are integrating some feature that really NEEDS something like React (hosting your own blog on the same site, for example), simpler is better. It is good to know when to use the right tool for the job.

While no, the physical size of node_modules itself is not the straw that broke the camel's back, it is the complexity of the underlying JavaScript bloat it contains, which needs to be loaded just to make the app function, in addition to any plugin features you might add that compounds the issue. (I myself am guilty of being very npm install some-cool-package trigger happy).

Like I mentioned though, while a seasoned dev (or dev team) can certainly mitigate these performance issues, for a noobie it's probably not the best choice.

Collapse
 
matthewekeller profile image
matthewekeller • Edited

This article is awesome! I am not nearly as experienced as you with React but I could smell this a mile away. Very entertaining article with completely air tight real world examples. You obviously put a lot of work into this. Come check out my framework analysis article here if you like. :) dev.to/matthewekeller/web-applicat...

Collapse
 
puruvj profile image
PuruVJ

This!!!

This is the kind of writing style I strive towards. Funny, quippy, yet on point.

Great work man!

Collapse
 
jpuls profile image
Jeff Puls

Thanks!

I'll be honest, I feel like my writing style is just a sarcastic byproduct of viewing one-too-many memes 😅

Collapse
 
puruvj profile image
PuruVJ

Got it!! Thanks for giving me the formula. Heading to Reddit now 😂

Thread Thread
 
jpuls profile image
Jeff Puls

godspeed

Collapse
 
devdufutur profile image
Rudy Nappée

React is intended to use for single page applications, not single webpage... Your portfolio isn't an application but just static HTML/CSS...

Collapse
 
jpuls profile image
Jeff Puls

You're right, and that's exactly why it made perfect sense to scrap React all together in this case.

I will say though, when I was first designing my portfolio, I had intentions of creating my own blog and such for it, but then ultimately decided it made more sense to simply include a feed to my recent DEV posts, rendering the site unnecessarily complex.

Live and learn 🤡

Collapse
 
matthewekeller profile image
matthewekeller

Single page applications are quite easy to write with HTML and CSS, some server side rendering, and ajax calls to refresh parts of the page. Huge client side JS frameworks are complete overkill and while a great solution for Facebook, not necessary at all for 95% of web applications.

Collapse
 
albertopdrf profile image
Alberto Pérez de Rada Fiol

Very well written post Jeff, and what a cool portfolio by the way! 😊

Collapse
 
jpuls profile image
Jeff Puls

Thank you, I appreciate it!