-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Getting Started with React
By :
As per Facebook's React documentation from http://facebook.github.io/react/docs/working-with-the-browser.html, the React component lifecycle can be broadly classified into three categories as follows:
"Mounting: A component is being inserted into the DOM.
Updating: A component is being re-rendered to determine if the DOM should be updated.
Unmounting: A component is being removed from the DOM."
React provides lifecycle methods that you can specify to hook into this process. We provide will methods, which are called right before something happens, and did methods which are called right after something happens.
Mounting is the process of publishing the virtual representation of a component into the final UI representation (for example, DOM or native components). In a browser, it would mean publishing a React element into an actual DOM element in the DOM tree.
|
Method Name |
Method Function |
|---|---|
|
|
This method is invoked before... |
Change the font size
Change margin width
Change background colour