React class components, lifecycle methods and hooks
Explain how React class components work and the order of their lifecycle methods (mount, update, unmount), then how the same behavior is written with hooks: useState, useEffect and its cleanup and dependency array, useMemo and useCallback. Say when each hook runs relative to rendering and what common bugs (stale closures, missing dependencies) look like.
No answer yet. Write the first one; the best answer gets endorsed.
