React class components, lifecycle methods and hooks

0
Remix

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.

SnowflakeTechnical phone screenLast asked Jan 2026
No answer yet. Write the first one; the best answer gets endorsed.