Some important topics of JavaScript before diving into React

A Thread🧵
1️⃣ ES6 classes

Although new developers are working with functional components, there is a possibility that you may encounter old written class component code. So it can be helpful to learn basic of ES6 class.
2️⃣ Basic understanding of var, let and const

You should have the basic understanding of variable declaration. When to use var, let or const. What is the block scope and stuff like that.

for example

var x = 2;
// Here x is 2
{
let x = 4;
// Here x is 4
}
// Here x is 2
3️⃣ Arrow functions syntax

Arrow function is a new ES6 feature that's been used almost widely in modern codebases because it keeps the code concise and readable. It allows a short syntax for writing function expressions.
4️⃣ Destructuring assignment

Destructuring is a convenient way of accessing multiple properties stored in objects and arrays.

Let's say:

const person = {
firstName: 'Pratham',
lastName: 'Kumar'
}

const {firstName, lastName} = person;
console.log(firstName); // Pratham
5️⃣ Array methods

You will use Array method multiple times. So try to learn them before jumping onto React

Some commonly used functions are
- map
- filter
- reduce
- find
- findIndex
6️⃣ Operators

- Ternary operator
- Spread operator

doYouLikeMyTweets ? "👍" : "👎";
7️⃣ Callback functions

A function passed as an argument to another function is called a callback if the function invokes the argument at a later time

You will use callbacks while working with hooks, forms, and other things
I think these are some important concepts that should be learned before React.

Did I miss something? Include below😉

Thanks for reading this🙏 ALL THE BEST💖
You can follow @Prathkum.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.