To react ComponentUpdate is a performance improvement technique that instructs React to refrain from re-rendering a component, even though state or prop values may have changed. Use this approach only when a component will remain static or pure. You must return a boolean value to the shouldComponentUpdate function in React.
Why is useEffect used?
UseEffect Hook was developed to eliminate the negative impacts of using class-based components. For instance, actions like altering the DOM, obtaining data from API endpoints, configuring subscriptions or timers, etc., can result in unwanted side effects.
What differentiates useState from useEffect?
Variables that are a part of your application's state and will change when users interact with your website are stored using the useState hook. Components can respond to lifecycle events like mounting to the DOM, re-rendering, and unmounting using the useEffect hook.
To know more about useEffect visit;
https://brainly.com/question/29619485
#SPJ4