-
When the element is created and inserted in the DOM.
-
React calls these hooks (methods).
- constructor()
- render()
- componentDidMount()
-
When props or state change.
- render()
- componentDidUpdate()
-
When the element is removed form DOM.
- componentWillUnmount()