Mount là khi component được thêm vào DOM lần đầu tiên.
- Update xảy ra khi props hoặc state thay đổi, khiến component re-render.
- Unmount là khi component bị xóa khỏi DOM.
- Các lifecycle methods (componentDidMount, componentDidUpdate, componentWillUnmount) hoặc useEffect hook xử lý các giai đoạn này.
Mount is when a component is added to the DOM for the first time.
- Update occurs when props or state change, causing the component to re-render.
- Unmount is when the component is removed from the DOM.
- Lifecycle methods (componentDidMount, componentDidUpdate, componentWillUnmount) or the useEffect hook handle each of these phases.