DEV Community

Al Hasan Dhali
Al Hasan Dhali

Posted on

Which one learn first, React.js or Node.js?

Top comments (7)

Collapse
 
cristhos profile image
Br CRISTAL DIBWE

The shortest path is a straight line.

  1. Javascript
  2. Nodejs
  3. ReactJs
Collapse
 
hashimwarren profile image
Hashim Warren

First I assume you want to be a full stack JavaScript developer.

Node will be used to build and bundle your React code. Often React courses will teach enough Node for you to be able to do that.

Most Node course will teach you how to create a server, and API, and security, and work with a database. That's overkill for learning React.

So I recommend learning React first, then Node.

Collapse
 
bcowley1220 profile image
Brendan Cowley

Once you have a great grasp on JavaScript, I would highly recommend that you spend the time to learn node as thoroughly as possible. I can tell you from personal experience that just having a cursory knowledge and node is not enough. The expectations for a full stacked dev are ever growing, and you need to be able to do the basics impeccably well.

On the node front, I would highly recommend that you gain the understanding and mastery of middleware, session and JWT auth, and working with FS.

I specifically call out node first because once you dive into react you are going to fall down that rabbit hole for quite a long time. It's just not enough to be able to write in hooks and use contacts, you are going to have to know how to use and write in classes. If you are a new dev, the dirty little secret nobody will tell you is that every company and their mother claims to be on the bleeding edge of technology but you will almost always end up supporting legacy apps unless your company only builds new products.

Collapse
 
chsanch profile image
Christian Sánchez

Node.js is JavaScript runtime environment, it would execute your JavaScript code.
React is a JavaScript library for building user interfaces, so you need to write JavaScript code and run it on node.
You probably need how to write JavaScript code first, then you should learn how to use React as a library, and node will run all of it.

Collapse
 
ameerhamza profile image
Ameer Hamza

JavaScript

Collapse
 
bradtaniguchi profile image
Brad

React, and realizing using something like create-react-app uses nodejs.

Also React because JS is basically the only choice for JS on the front-end, where-as the back-end has all the options.

Collapse
 
pauldunz profile image
Paul Dunz

Definitely NodeJS, especially because of node packages that can be used in ReactJs