DEV Community

Cover image for VanillaJS or Frameworks/Libraries (React)?
Duzmath Lajos
Duzmath Lajos

Posted on

VanillaJS or Frameworks/Libraries (React)?

Hello Everyone!

For the last couple of weeks, I have a big dilemma. I really don't know, if I should stick with VanillaJS or focus on learning React.

The reason behind this (these are all personal and from my points of view):

VanillaJS

Pros:

  • Easier to write and more logical
  • Seems more usable for me, for some reason
  • Lot of easy/intermediate projects for learning
  • More enjoyable to write
  • More experience of success

Cons:

  • Feels like I will never really use this if I land a job
  • Less maintainable
  • Not really an up-to-date knowledge

React

Pros:

  • Widely used in the industry
  • Component based architecture is easier to maintain

Cons:

  • Really hard to find REAL beginner projects (feel like a Tic-Tac-Toe game or a To-Do list is not beginner friendly, because you cannot figure it out alone) Therefore the next point:
  • Less experience of success
  • Hard to understand the basics
  • Seems like you MUST use a CSS framework for it (but Tailwind and/or Bootstrap is really not my cup of tea)

Also, the biggest fear of mine, that I will forget the VanillaJS, while I dig into React...yes, this might be the biggest fear in the story for me.

I am really looking forward onto some encouraging on both of the topics.

Thank you in advance for your kind help and assistance.

Latest comments (25)

Collapse
 
sodjanathan profile image
nat_souljah

If learning is the problem, I recommend John Smilga's react course, the best I have seen so far, it's in freecodecamp now

Collapse
 
heyprotagonist profile image
Anguram Shanmugam • Edited

Absofruitly not.
It depends totally on the POV you relay in React.
React is not like VUE, Angular.

In a Nutshell React Don't manipulate vanilla JS it just try wrap them. Try the docs @17.0.1

So, It's safer to say that the new concepts you learn in JavaScript / ECMA. You can apply most of it.

You don't need to be afraid unless you don't write code that end with .JS 👍

Collapse
 
codebyjustin profile image
Justin

Just depends on the size of the project and size of the team.

Collapse
 
joelnwalkley profile image
Joel N. Walkley

I want to challenge that first assumption - it is not Vanilla JS OR React. Having a solid foundation in JS is vital to doing well with React development. I would also add to the "cons" that without knowledge of a modern UI library like React/Angular/Vue you won't be as marketable with only plain JS.

As you get closer to building something a bit more market ready React helps immensely with things that are really difficult in JS alone: reusable components, a stateful reactive UI, dynamic data from an API.

Taversy's 2021 React Crash Course released a few weeks ago would be excellent for you. It has a great, beginner friendly tutorial, and assumes strong knowledge in JS. Check it out.

Collapse
 
shriji profile image
Shriji

^This is a comic article, I just took a small jab at React.

I highly recommend Svelte, if you already know HTML, CSS and JS then you know 50% of Svelte ;)

All the best!

Collapse
 
valeriavg profile image
Valeria

If you don't like React, take a look a Svelte. It's much closer to the ground (HTML/CSS/JS).
You may also take a look at WebComponents and custom elements in general.

Now back to React. No, you don't need to use CSS framework, you can write your own styles using anything from plain CSS to SASS/less to CSS-in-JS. One thing to keep in mind that React itself is just a JS library, wrapped in several layers of tools. Try writing something using React.createElement instead of <JSX />. The classic React counter may be the turtorial you're looking for (I Googled for one and found wsvincent.com/react-counter/ but there's probably much more like this).

Good luck!

Collapse
 
ivan_jrmc profile image
Ivan Jeremic • Edited

Once you learn React you will never go back to write apps in vanilla js.

Collapse
 
jwp profile image
JWP

The job market for React is red hot right now.

Collapse
 
yobretyo profile image
Bret

I started with “vanilla”, but tutorials are a joke to TRULY get the real use of what’s taught, because allot of the concepts, are ended by a “console.log” and they don’t truly use what they teach.... JS has been tough for me, but react has helped me allot. A Todo app, is not a fair example of web design at all......

Collapse
 
linhtch90 profile image
Linh Truong Cong Hong

You should try Angular. This framework has amazing documentation for beginner to get started by building a simple shopping cart.

Collapse
 
mjablecnik profile image
Martin Jablečník

Angular don't have a good reputation between developers: 2020.stateofjs.com/en-US/technolog...
I would recommend the React or Vue. It have a same maturity and better reputation and experiences between developers then Angular..

Some comments may only be visible to logged-in visitors. Sign in to view all comments.