We’ve come to the end of the lesson. We’ve learned about the three major phases of a component’s lifecycle:
componentDidMount()are called during this phase.
componentDidUpdate()are called during this phase.
componentWillUnmount()was called here, which was a good time to clean things up.
We also learned about setting up side-effects and tearing them down. We now know how to make more robust, complex components!
To your right is a reference that you can use. It shows the three phases of a component’s lifecycle and which methods are called at each phase. You can also refer to this interactive diagram.