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💖

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Pratham 👨‍💻🚀

Pratham 👨‍💻🚀 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Prathkum

15 Feb
Beginner friendly thread to start with Web Development in 2021

THREAD🧵👇 Image
Did you know you don't need any prior coding knowledge to start with web development.

You can start it with scratch. You neither need to install any software initially you can make your first site on Notepad or some online editor

(2 / 13)
📌 Tools you need

- An editor, where you can write some code.

There are two options

1. Install editor on your machine
2. Use an online editor

(3 / 13)
Read 13 tweets
13 Feb
Start your 100 Days of Code journey with this thread⚡

🧵👇
Hey, there👋

If you want to learn web development then this thread is for you. In this thread, I'll try to give a basic overview of

What 100DaysOfCode is?
How to manage your time?
How to divide your time?

And any other doubt you have in mind... So Let's go

(2 / nn)
In this 100 Days you need to cover mainly 4 technologies

- HTML
- CSS
- JavaScript
- DOM

Now you might be wondering why DOM? But trust me its important and necessary😉

(3 / nn)
Read 22 tweets
12 Feb
Don't repeat my mistakes❌👇

When I was learning Java, about 3 years ago, I tried to remember the code of the star patterns (It may sound silly)🙃

I was like what is the use of this star pattern in the real world. They meant nothing to me

(1 / 4)
Later I realized that coding is about creating logic in the mind so that we can reach an effective solution

By star patterns, they were trying to make my better understanding on for loops and if conditions. So that my logic building ability can be improved

(2 / 4)
The other big mistake I made was "didn't ask this question at the time".

I think I should have asked
Why star patterns?
What's the use of this?

But we learn from our mistakes. I also learned

(3 / 4)
Read 4 tweets
9 Feb
A compiled tweet of the CSS cheats sheet I created in the last few days

🧵👇
Border-radius
Flexbox
Read 8 tweets
6 Feb
We can't create gradient border directly but we have a trick😉

A SHORT THREAD🧵 Image
This is pretty easy. It will just take 5 minutes😄

STEP 1:
- Create your element around which you want to create gradient border

In this example I have a sqaure around which I'll create gradient border
STEP 2:
- Create pseudo-element with little extra height and width

Let's say if my sqaure height width is 300px then I'll set 304px height and width of pseudo-element
Read 6 tweets
4 Feb
Everything you need to know about useEffect hook of React

A beginner's guide

Thread🧵👇
If you're familiar with class components then you might know that we have various lifecycle methods but in functional components, we don't have any lifecycle methods.

Instead we have a powerful hook called useEffect💪
By using useEffect, you tell React that your component needs to do something after render. React will remember the function you passed (we'll refer to it as our “effect”), and call it later after performing the DOM updates

So let's start by understanding the syntax first👇
Read 14 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!