Javascript,Nodejs,MongodDB,WordPress,CSS,PHP

LightBlog

Monday, October 29, 2018

Reactjs Component Life Cycles

ComponentDidMount():

componentDidMount is called once, but immediately after the render() method has taken place. That means that the HTML for the React component has been rendered into the DOM and can be accessed if necessary. This method is used to perform any DOM manipulation of data-fetching that the component might need.

ComponentwillMount():
is called only once in the component lifecycle, immediately before the component is rendered. componentWillMount is largely considered problematic, and as of now, is being considered for deprecation. 



1 comment: