Planning to learn React? Knowledge of a few JavaScript concepts can make the process easier for you.
Let's see some basic JavaScript modules that can help you π§΅ππ»
Keep JavaScript aside for a moment, Knowledge of basic HTML and CSS is a must in my opinion.
React is all about building user interface so you'll be working with HTML and CSS as well. So start with these first
1. Basic programming knowledge which is must
- Data types in JavaScript
- Variables
- Statements
- Control statements
- Operators
2. Functions
A JavaScript function is a block of code designed to perform a particular task. This is again pretty basic stuff.
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: ππ»
5. Array methods
You will use the Array method multiple times. So try to learn them before jumping onto React
Some commonly used functions are
- map
- filter
- reduce
- find
- findIndex
6. Special operators
Not mandatory but knowledge of these two can be useful. This is not a big concept or something. You can learn it literally in about a minute
- Ternary operator
- Spread operator
doYouLikeMyTweets ? "Yes": "Definitely yes";
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. A quick example ππ»
8. Async, await and promises
Async function is a function that returns some promise. A promise is a special JavaScript object that links the βproducing codeβ and the βconsuming codeβ together. Whereas await makes a function wait for a promise.
Here is the React introductory thread that can help you kick-start your React journey.
Explore and create accessible color palettes using color wheel, in a variety of color variations and contrast levels. It will tell you automatically if two colors are not accessible