Posted On: Feb 22, 2018
Each component has several “lifecycle methods” that you can override to run code at particular times in the process. Methods prefixed with will are called right before something happens, and methods prefixed with did are called right after something happens.
These methods are called when an instance of a component is being created and inserted into the DOM:
An update can be caused by changes to props or state. These methods are called when a component is being re-
This method is called when a component is being removed from the DOM:
Each component also provides some other APIs:
Source: https://facebook.github.io/react/docs/react-component.html
Never Miss an Articles from us.
React js is javascript based UI Library developed at Facebook, to create an interactive, stateful & reusable UI com..
Advantages of React JsReact.js is extremely efficient: React.js creates its own virtual DOM where your components act..
React Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.Concep..