React vs Plain JS

rickdelpo1

Rick Delpo

Posted on April 17, 2022

React vs Plain JS

This piece is not meant to be a rant about React but rather just some observations. I hope that writing this does not make me unpopular. I do welcome opposing opinions.

I got involved with React only one year ago because I read so much about it (jamstack, netlify, serverless etc). I am a simple developer, primarily back-end, so I don’t think I need all the frills React has to offer. Please convince me otherwise.

After about one month of struggling with React I switched to Plain Vanilla Javascript for the following reasons:

  1. React seemed too complicated but I was happy to learn it
  2. I did not want to be beholden to Node JS
  3. Babel placed a cookie at my site when i used this react library vs node on my html page
  4. I was intimidated by React because I don’t feel smart enough, it seems a bit over my head. Please explain State in plain English.
  5. I discovered array methods in plain js for rendering data in html
  6. no libraries to import with plain js
  7. plain js seems much more sophisticated these days than 5 years ago
  8. all i really want from my JS is a Fetch or axios api (the http client)
  9. I fetch AWS Lambda functions in my plain JS where I use Lodash which is similar to array methods but u do need to import both fetch and Lodash in Lambda. I still avoid Node this way.
  10. SEO is impacted when we use React. Even with SSR I did not want to do the extra step and also with SSR it seemed complicated to become serverless
  11. I did not want to do Gatsby, just simple JS (I don't fully understand why we need additional React libraries like Gatsby or Next.JS). As a beginner, after just barely grasping basic React, I was immediately faced with learning these other things that also use React. It was a turnoff because I was already overwhelmed.
  12. my needs were just simple JS, I just want a little bit of JS not a lot
  13. same goes for NODE JS, I don’t want the whole enchilada just a small part of it so I imported Babel library in my html. I was turned off by the hundreds of dependencies imported with Node
  14. I did not like React Router
  15. I don’t like the idea of a single page app in React
  16. I think JSX is cool but don’t really need or want it
  17. I now use AWS Lambda for my server side logic so I don’t really need Node JS. Prior to Lambda I deployed Java Servlets at server side. I recognized the need to be more modern day with my stack.

Wow, I didn’t think I had this many reasons for opting to use Plain JS vs React

I do like challenges but I really did not want to be married to React. My architecture involves much more than the front end and I don’t have the time to put in for the seemingly high React learning curve.

I am a Java and SQL developer so not much of a front end person anyway. Do a Google search on Rick Delpo to find out more about me or visit my website where I have supporting material for this article at https://howtolearnjava.com or at https://javasqlweb.org/AWS/

Thanks for reading and I invite comments on such a controversial topic. Please, I would be very interested in comments about why React is so great. I would definitely use React in some use cases if someone gives me a compelling reason to do so.

Self criticism - I might be too shortsighted because I am a back-end developer (always eager to learn more though)

💖 💪 🙅 🚩
rickdelpo1
Rick Delpo

Posted on April 17, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

React vs Plain JS
react React vs Plain JS

April 17, 2022

How I created in-memory DOM?
react How I created in-memory DOM?

July 15, 2021

React without JSX
react React without JSX

May 23, 2021