ReactJS – useEffect Hook

1.The Effect Hook allows us to perform side effects (an action) in the function components.
2.Function component doesn’t have life cycle methods which are available in class components ,In other words Effects Hooks are equivalent to componentDidMount(),
componentDidUpdate() , and componentWillUnmount() lifecycle methods.

React Hooks

1.Hooks are the new feature introduced in the React V16.8.0 version.
2.Hooks are functions that let you “hook into” React state and lifecycle features from function components.
3.Hooks don’t work inside classes — they let you use React without classes.