Props => Details sent to the Component which it can use
PropTypes => Puts a check on the type of props sent
defaultProps
Hooks => Features of Class based components in Function based component => Able to use "states" in other life-cycles methods
React
useState => Creates the state Variables
useEffect => Causes effects like data fetching, subscriptions, manually changing DOM etc.
useContext => Used for Context API
useRef => Keeps reference to a DOM element
useReducer
React Router
useLocation
useHistory
Redux
useSelector
useDispatch
Component Life Cycle => The series of events that happens from the mounting of a React component to its Unmounting
Definitions
Mounting => Birth of your Component
Update => Growth of your Component
Unmounting => Death of your Component
Methods
constructor()
render() => Used to render HTML of the Component, Required for a class based component to render DOM, Runs during Mounting and Updating, Can't modify state inside it
componentDidMount() => Runs after component output has been rendered to DOM
componentDidUpdate() => Invoked as soon as the updating happens, Mostly used for updating the DOM in response to prop or state changes
componentWillUnmount() => Called just before the component is unmounted and destroyed, Usually used to perform cleanups