1. setState() - Callback Function
- The setState()is asynchronous, it takes an optional callback parameter that can be used to make updates after the state is changed.
Syntax
JSX
2. React Icons
- react-iconsis a third-party package contains bundle of icons like bootstrap, font awesome, material icons etc..,
Check react-icons website here .
2.1 Installing React Icons
- This below command installs all the react-icons library in your React project.
2.2 Searching React Icons
- Click on the Icon to copy the Icon Name.
2.3 Importing React Icons
The First letters of the icon indicates the category of the Icon.
Each category of Icons have import statements separately, go to the category and copy the import statement.
Example:
JSX