JavaScript essentials for your React journey

➊ Basics

⇥ Variable Declaration
⇥ Variable Scope
⇥ Variable Hoisting
⇥ Functions
⇥ Arrow Functions
⇥ Callback Functions
⇥ Closure
⇥ Basic Operators
⇥ Array Literals
⇥ Object Literals
⇥ if, if...else
⇥ for, for...in, for...of, while, do...while
➋ Array.prototype Methods

⇥ forEach()
⇥ map()
⇥ reduce()
⇥ flat()
⇥ flatMap()
⇥ find()
⇥ filter()
⇥ slice()
⇥ splice()
⇥ push()
⇥ pop()
⇥ shift()
⇥ unshift()
⇥ some()
⇥ every()
➌ Array Destructuring

It's frequently used in hooks esp. useState()

Example:

⇥ const [fruits, setFruits] = useState([]);
➍ Array Spread

There are so many use cases. One of the place where we frequently spread an array is adding/updating/removing an item from the state.

Example:
Add an item to the starting of Array

⇥ let newArray = [itemToAdd, ...oldArray]
➎ Object Destructuring

⬒ Properties are passed as an object parameter to our function component.

⬓ We can destructure it and, specify only those properties that we are going to use.

Example:

function MyComponent({name, address}) {

}
➏ Object Spread

We may spread an object to pass those to a child component.

Example:

function MyComponent({name, address, ...rest}) {
return <ChildComponent {...rest} />
}
➐ Template Literals

⇥ Untagged Template Literals
⇥ Tagged Template Literals
This one is used heavily in few styling libraries.
➑ ES Modules

⇥ import
⇥ import {}
⇥ export
⇥ export default
👉Suggestions👈

Do you think anything is missed here? Add those in the 💬
🎯 Final Words

⬖ Learning method varies from person to person.

⬘ Though it's not mandatory to have JS knowledge, you can learn both React and JS at the same time.

⬗ But for a smooth riding, it's advisable to have basic knowledge of JS before starting your React journey.
🚏 Upcoming Twitter Space

📅 12-Feb-2022 (Tomorrow)
⏰ 07.30PM IST (02.00PM GMT)

⬘ Join me in this space to have some interesting technical discussion around "Arrays and Functions in JavaScript".

⬙ Share among your circle if anyone is interested.
twitter.com/i/spaces/1dRJZ…
End of 🧵

Hope you found this one useful. I am sharing "Guidance" threads on HTML, CSS, JavaScript and React.

To never miss any, Follow me ✅

• • •

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

Keep Current with Swapna Kumar Panda 

Swapna Kumar Panda  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 @swapnakpanda

Feb 12
JavaScript Interview Questions

Series: 2️⃣
Level: Beginner
Topics:

➊ Basics about Arrays
➋ Array Properties
➌ Array Methods
➍ Looping through Arrays
➎ Array related Operators
➏ Common Array Operations
➐ Comparison of Terms
🚥 Disclaimer

⬖ The questions covered here are mostly conceptual
⬘ I never claim only these type of questions are/should be asked during interviews
⬗ For interviews, you should have fundamentals strong. And you should be able to provide solutions to practical problems.
Read 20 tweets
Feb 10
25 Utility Code for your next JavaScript Project

➊ Check if input is of number type
➋ Check if input value contains a number
➌ Check if input value is null or, undefined
➍ Check if input value is null or, empty string
➎ Check if input value is falsy
➏ Check if input is an Array
➐ Check if input is an Empty object
Read 11 tweets
Feb 9
Do you think it's peculiar?

parseInt(0.5); // => 0
parseInt(0.05); // => 0
parseInt(0.005); // => 0
parseInt(0.0005); // => 0
parseInt(0.00005); // => 0
parseInt(0.000005); // => 0
parseInt(0.0000005); // => 5

Here's why. A JavaScript 🧵
➊ What is parseInt?

parseInt is a function which

→ takes a "String" input
→ parses this input
→ returns the parsed "integer" value
➋ What if input is not a String?

If input is not a String, it's first converted to String and, then parsed.
Read 9 tweets
Feb 8
🎨 All (140) HTML Color Names

If you are interested in the HD quality of this cheat sheet,

✓ Like (❤️) this Tweet
✓ Follow me ✅
✓ Reply (💬) to this Tweet with a 👋
✓ Retweet (🔁) for more chances.

I will share you the direct link in DM. Image
🚥 Disclaimer

I have compiled these information with all sincerity. But in case you find any omissions or, wrong representations, please inform me.
🚏 Upcoming Twitter Space

📅 12-Feb-2022 (Saturday)
⏰ 07.30PM IST (02.00PM GMT)

⬘ Join me in this space to have a technical discussion around "Arrays and Functions in JavaScript".

⬙ Share among your circle if anyone is interested.

twitter.com/i/spaces/1dRJZ…
Read 4 tweets
Feb 6
100+ Project Ideas for JavaScript "Absolute Beginners"

🚥 Disclaimer

⬖ Complete projects as per the order in which they are mentioned.

⬘ Knowledge of HTML & CSS is very much required for designing UI.

⬗ Take these ideas and, form your own ideas. Do not STOP.
➊ Unit Conversion

➀ Currency
➁ Weight
➂ Height
➃ Temperature
➄ Distance
➅ Area
➆ Volume
➇ Time
➈ Numbers (Binary, Octal, Hexadecimal)
➉ Color (rgb to hsl)
Read 15 tweets
Feb 5
🚏 Database Categories w/ Examples
Broadly databases can be categorised into below categories.

🛢
⮑ Relational
⮑ NoSQL
⮑ Document
⮑ Wide-Column
⮑ Key-Value
⮑ Graph
⮑ Time Series
⮑ Search

And, few others.
🚥 Disclaimer

I have compiled these information with all sincerity. But in case you find any omissions or, wrong representations, please inform me.
Read 5 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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(