Props stands for properties and refers to the mechanism for passing data from one component to another within an application.
-
Parent Component Passing Data: A parent component can pass data to a child component by using attributes similar to HTML attributes.
-
Receiving Props: The child component receives the data passed by the parent as props. Props are received as an object within the child component.
-
Immutable Data: Props are immutable, meaning that a child component cannot directly modify the props it receives from its parent. They are read-only.
-
Functional and Class Components: Props can be used with both functional and class components in React.
1: Clone the Project
2: Simply run the command npm install - First to install all the packages
3: Run the project using npm start