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.