How Much JavaScript Do You Need to Know Before Learning React?

One of the most common questions I get asked is

How much JavaScript do I need to know before I start learning React?

In my opinion, it's best to learn JavaScript before diving into a framework. Frameworks have their own unique concepts, but they all rely on core JavaScript concepts.

By learning these concepts beforehand, you will have an easier time grasping the concepts of a particular framework. You will also be able to pick up multiple frameworks with ease, because you already have a solid foundation in the core concepts of JavaScript.

I suggest learning these concepts before jumping to a JS framework -

JS Fundamentals: Learn about the basic syntax, variables, functions, arrays, objects, loops, conditionals, and other basic concepts.

Basic DOM Manipulation: While you may not interact directly with the DOM in frameworks, learning it will give you a deeper understanding of how things work behind the scenes. Learn how to add elements to the page, add or remove classes, and add styles and so on.

Modules: Modules are used to import files/pieces of code to other files. It's important to learn how the syntax works because any application of yours will likely need to make use of modules for code reuse and organization. Learn about ES6 Modules, exporting and importing modules.

Array Methods: You will work with arrays a lot, so it's good to learn about the most frequently used array methods like find(), some(), every(), includes(), forEach(), map(), reduce() etc.

Asynchronous JavaScript and Fetch API: Since we deal with asynchronous data in almost every application, it's important to learn about it. This means that something is happening in the background, but you don't want to wait until it finishes to continue doing your work. Learn about Callbacks, Promises, async/await, and using Fetch API for making HTTP requests.

ES6 Syntax: It's important to familiarize yourself with ES6 syntax as most frameworks use a lot of it. This includes rest parameters, spread operators, template literals, arrow functions, etc.

Everyone learns in a different way. I know some people that learn a framework and JS at the same time. I would not recommend it, but I have seen it work for some.

Get my free, weekly JavaScript tutorials

Want to improve your JavaScript fluency?

Every week, I send a new full-length JavaScript article to thousands of developers. Learn about asynchronous programming, closures, and best practices — as well as general tips for software engineers.

Join today, and level up your JavaScript every Sunday!

Thank you, Taha, for your amazing newsletter. I’m really benefiting from the valuable insights and tips you share.

- Remi Egwuda