Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 17, 2022 08:49 pm GMT

Do You Need To Master JavaScript Before Learning React?

One of the main concerns that I see at different platforms from developers learning React is the relationship between JavaScript knowledge and React. Most of them know that React is a JavaScript library and thus that they should have a certain level of knowledge about JavaScript. But theyre often uncertain about how much they should dive into JavaScript before turning towards React.

As someone who started learning React on his own more than 4 years ago and has been working as a React developer for the past 3 years, its a concern that Im extremely familiar with. Its a struggle that I had as well in the beginning. Although it worked out in the end, it definitely couldve been a smoother process. Using that experience, this article will cover whether you should master JavaScript before learning React and how far you should take it.

The main concern that newcomers often have is that their mastery of JavaScript is limited and therefore they arent able to properly learn React.

It is certain that having prior knowledge and a proper understanding of JavaScript will help you pick up React quicker. Ultimately, React is just a UI library built on top of HTML/CSS/JavaScript, where JS is responsible for most of the logic. Knowing about concepts like variables, array functions, callbacks, scopes, closures, and other JS related topics will definitely benefit you. It will tremendously speed up the pace at which youre able to study and learn React.

But, does that mean that youre not able to study React without knowing those concepts?

I would say its definitely recommended to familiarise yourself with them. It will make your learning process considerably easier, but its by no means a necessity. If your goal is to pick up React, dont wait with it until you think youve mastered all of JavaScript. Based on personal experience, its likely that that moment wont happen. In the end, the only thing you will have achieved is learning JavaScript instead of React.

There are a lot of resources out there that will give you pointers towards the recommended JavaScript concepts and functions to learn before React. Take a look and familiarise yourself with them, but dont spend years on it. Knowing that they exist should be enough for most of the cases. After that, start learning React.

Yes, there will be JavaScript topics that you dont understand, but thats fine. Since you already familiarised yourself with the most common JavaScript topics, you should be able to go through React without stopping for every JavaScript topic. You can look up the topics that you dont understand and then learn about them on the fly. Doing it while learning React guarantees you that its relevant and increases the chances of it sticking.

But, should I learn everything about JavaScript then?

Not really. While knowing certain JavaScript concepts is beneficial, not every concept in JavaScript is also used in React. For example, I would say that its perfectly fine to not know about the details of this (if youre not using class components) or how the prototype chain works. While they are crucial for proper JavaScript development, some topics will not be relevant on a day-to-day basis as a React developer.

Final Thoughts

People often try to over-prepare themselves. The same applies to learning new technologies, frameworks, or libraries. Ive seen a lot of developers also do this with React, myself included when I started my journey into frontend development. Looking back at it, this article uses that experience to answer some of the biggest concerns about the relationship between JavaScript and learning React for newcomers.

React is a JavaScript-based UI library, there is no way around it. If you want to write React code, youll also have to write JavaScript code. Therefore, its recommended to learn a bit about JavaScript. But dont overdo it. Create a foundation and move on to React. In the worse case, you can learn things on the fly. Ultimately, your goal is to learn React, not JavaScript.

If you liked this article, consider checking out the other entries in the Uncommon React newsletter or my Twitter for future updates. If you like my content, consider sponsoring me with a coffee to keep me going.


Original Link: https://dev.to/keraito/do-you-need-to-master-javascript-before-learning-react-4k11

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To