Swapna Kumar Panda ๎จ€ Profile picture
Mar 20 โ€ข 16 tweets โ€ข 3 min read
How much JavaScript is good enough to start in React?

โ‡ฉ
๐Ÿ’ญ Why is this Thread?

โฌ˜ JavaScript and React both are popular and having a large share.

โฌ— I have often seen people jumping straight to React without much knowledge in JavaScript.

โฌ™ Is this a good idea? If no, then how much JavaScript knowledge is enough to start React?
๐Ÿ‘ฉโ€๐Ÿ’ป Beginning Words

โฌ– I suggest to start learning JavaScript first.

โฌ˜ If you start with React, you would frequently travel between JavaScript and React making the learning progress slower.

โฌ— Let's see how much JavaScript should be enough to start working in React.
๐Ÿ“‹ What should I learn?

โžŠ Basics
โž‹ Array.prototype Methods
โžŒ Array Destructuring
โž Array Spread
โžŽ Object Destructuring
โž Object Spread
โž Template Literals
โž‘ ES Modules
โžŠ 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()

Know more:
โžŒ 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
๐Ÿ 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.
โš ๏ธ Repost Notice โš ๏ธ

โฌ˜ Though this is my original work, portions of it was previously posted in [CHIRPBIRDICON]

โฌ™ If you liked this content and do feel others might learn from it, please support.
๐Ÿ’ญ Feedbacks

โœง Did you find this thread useful?
โœง After reading through entire thread, have you learnt something worth?
โœง What improvements will you suggest?

Hey ๐Ÿ‘‹. I will be happy to hear from you. Your feedbacks would help me sharing better contents in future.
End of ๐Ÿงต

Hey ๐Ÿ‘‹ I am a Tech Educator from India ๐Ÿ‡ฎ๐Ÿ‡ณ

I am sharing Tutorials, Tips, Techniques, Infographics, Cheat Sheets, Interview Questions and Roadmaps on Web Development, DSA and, Database.

Are you interested? I am sure, you are.

To never miss anything, 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

Mar 21
15 Useful HTML Elements for Text Contents

โ‡ฉ
๐Ÿ“‹ What shall we explore?

โžŠ abbr
โž‹ dfn
โžŒ em
โž strong
โžŽ mark
โž small
โž q
โž‘ blockquote
โž’ cite
โž“ var
โžŠโžŠ code
โžŠโž‹ kbd
โžŠโžŒ samp
โžŠโž data
โžŠโžŽ time
๐Ÿ’ญ Why is this Thread?

โ‘ In a typical web page, we render varieties of text contents. The context of few contents may vary from others.

โ’ Sometimes we may have to highlight them semantically for SEO and Accessibility purposes.

โ‘ Let's explore 15 such HTML elements.
Read 21 tweets
Mar 19
๐Ÿ’œ JavaScript: Array's length vs String's length
-
โ‡ฉ Array's length property is mutable whereas String's length p
โžŠ Introduction

In JavaScript,

โœง Array is an Object whereas String is a primitive

โœง Despite String being a primitive, for easy operations it has a lot of methods and, properties

โœง String is considered as Array-Like

โœง Both Array and, String has a "length" property
โž‹ Array's length

โœง Unlike many other languages, JavaScript actually allows to modify an array's length manually.

โœง If we set a larger length, few blank spaces (holes) are added to the end.

โœง If we set a smaller length, elements are removed from the end.
Read 7 tweets
Mar 18
๐Ÿ”  CSS Font Related Properties & Values
๐ŸŒ† Direct Link for High Resolution Image

If you liked this one, give a โญ๏ธ to this GitHub repo to support my work.

โœง Direct Link:
github.com/swapnakpanda/Iโ€ฆ
๐Ÿ“‹ Properties we covered

โžŠ font-family
โž‹ font-size
โžŒ font-weight
โž font-style
โžŽ font-variant
โž text-decoration
โž text-transform
โž‘ color
Read 14 tweets
Mar 17
๐Ÿฆพ 11 Modern JavaScript Hacks

โ‡ฉ
๐Ÿ’ญ Why is this Thread?

โ‘ The code we write should be readable and, maintainable. But that doesn't mean it should be verbose.

โ’ With ECMAScript new specifications, many newer syntaxes are available which we should try to use mostly.

โ‘ Let's explore few such modern tricks.
๐Ÿ“‹ Table of Contents

โžŠ Conversion to Number
โž‹ Conversion to Boolean
โžŒ Conversion to String
โž Complex String
โžŽ Short Circuit && / ||
โž Nullish Check
โž Default Value
โž‘ Default Function Parameter
โž’ Optional Chaining
โž“ Array Resizing
โžŠโžŠ Function Rest Parameter
Read 16 tweets
Mar 16
60+ Shorthand Properties : CSS Cheat Sheet

โ‡ฉ
๐ŸŒ† Direct Link for High Resolution Image

If you liked this one, give a โญ๏ธ to this GitHub repo to support my work.

โœง Direct Link:
github.com/swapnakpanda/Iโ€ฆ
Read 10 tweets
Mar 15
Why <!DOCTYPE html>?

โ‡ฉ
โžŠ History

โœง In the old days of the web, pages were written in two versions: One for Netscape Navigator, and one for Microsoft IE.

โœง When the web standards were made at W3C, browsers could not just start using them, as doing so would break most existing sites on the web.
โœง Browsers therefore introduced two modes to treat new standards compliant sites differently from old legacy sites.

โœง Modes were: Quirks Mode and Standards Mode.

โœง For HTML documents, browsers use a DOCTYPE in the beginning of the document to decide which mode to handle.
Read 12 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!

Follow Us on Twitter!

:(