PropTypes: React props, which stands for “properties,” are used to send data from one component to another.React has an internal mechanism for props validation called PropTypes.Props and PropTypes are important processes because they work pass only readable features in the feedback elements.
Benefits of PropTypes : PropTypes makes it easy to catch bugs caused by passing data of data type .
State-props: Props are short for properties. Props are used to pass data between React components. Mainly react data flow between components is unidirectional . It can pass data from upper level to lower level.React maintains inheritance
Here data is being passed from the previous component to the following component through props.
State allows elements to create and manage their own data.State on the other hand is still a variable, but directly initialized and managed by the component.
these are all HTML tags used in React in JSX.
Hooks: Hooks are backwards-compatible,which means it does not contain any breaking changes. This page provides an overview of Hooks for experienced React users. This is a fast-paced overview.
Here, useState,useEffect are basic hooks.usestate use to declare a state in React app. UseEffect allows us to perform side effects in the function components.
In this picture usecart is a custom hook.This hook I used to calculate the price of the product