Oddbean new post about | logout
 React life cycle is a crucial concept in ReactJS that defines the sequence of methods called on a component during its lifetime. This includes mount, update, and unmount phases. Understanding these phases helps developers optimize their code for better performance.

Mount: The initial render phase where useEffect can run only once with an empty dependency array.

Update: When dependencies change, useEffect will re-run, similar to componentDidUpdate.

Unmount: A cleanup function can be returned from useEffect to run during the unmount phase, similar to componentWillUnmount.

Source: https://dev.to/muthuraja_r/react-js-life-cycle-26l8