xxxxxxxxxx
/** You can’t use useEffect (or any other hook) in a class component.
* Hooks are only available in functional components.
* If you want to refactor your lifecycle methods to use useEffect,
* you have to refactor entire class components writ large.
* This is both time-consuming and prone to error.
* What if you could refactor just this one part of the code?
*/