Hassib Moddasser
Hassib Moddasser

@hassibmoddasser

12 تغريدة 12 قراءة Oct 21, 2021
⚛️ React Lessons
Before diving into React
In this thread, I'll go through the must-know JS topics that any web developer should know before diving into React.js or any other JavaScript library/framework.
🧵👇
Hi,
I'm Hassib, a Software Engineer with 4+ years of experience in coding JavaScript.
In this thread, I'll go through the must-know JS topics that any web developer should know before diving into React.js or any other JavaScript library/framework.
Let's begin!
{ 1 / 10 }
1⃣ Use `let` & `const` instead of `var` for declaring variables to avoid hoisting.
Variables declared with the `var` keyword are hoisted which means they are accessible in their enclosing scope even before they are declared.
{ 2 / 10 }
2⃣ Template Literals
Template literals are string literals allowing embedded expressions. You can use multi-line strings and string interpolation features with them.
Template literals are enclosed by the `backtick` character instead of using single or double-quotes.
{ 3 / 10 }
3⃣ Spread Operator
ES6 (ECMAScript 6) introduced Spread Operator which, allows an iterable such as an array, string, or object to be expanded.
{ 4 / 10 }
4⃣ Destructuring Assignment Syntax
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.
{ 5 / 10 }
5⃣ Arrow function expression
An arrow function expression is a compact alternative to a traditional function expression, but is limited and can't be used in all situations.
Read more: developer.mozilla.org
{ 6 / 10 }
6⃣ Classes
Classes are a template for creating objects. They encapsulate data with code to work on that data.
Read more: developer.mozilla.org
{ 7 / 10 }
7⃣ Modules
A common JS module is essentially a reusable piece of JavaScript that exports specific objects, making them available for other modules to require in their programs.
Read more: developer.mozilla.org
{ 8 / 10 }
8⃣ Default Function Parameters
Default function parameters allow us to initialize functions with default values. A default function parameter is used when an argument is either omitted or undefined.
{ 9 / 10 }
9⃣ Promises
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
Read more: developer.mozilla.org
{ 10 / 10 }
⚛️ Next Lesson: Getting started with React
Make sure to follow me @hassibmoddasser for the incoming threads and more JS topics!
Retweet the first tweet and share it with your friends in case you find it useful! 💛
{ END }

جاري تحميل الاقتراحات...