The Circle of a React Lifecycle

A React component goes through different phases as it lives in an application, though it might not be evident that anything is happening behind the scenes.
Those phases are:

mounting
updating
unmounting
error handling

There are methods in each of these phases that make it possible to perform specific actions on the component during that phase. For example, when fetching data from a network, you’d want to call the function that handles the API call in the componentDidMount() method, which … Read article
The post The Circle of a React Lifecycle appeared first on CSS-Tricks.

Link: https://css-tricks.com/the-circle-of-a-react-lifecycle/