adspace


What is the life cycle of reactjs?

Answer Posted / Surya Pratap

The life cycle of ReactJS consists of several phases, which are triggered at different times during a component's lifespan. The main methods include: Mounting - constructor(), getDerivedStateFromProps(), render(), and componentDidMount. Updating - getDerivedStateFromProps(), shouldComponentUpdate(), render(), and componentDidUpdate. Unmounting - componentWillUnmount.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use events in reactjs? Give an example of using events?

565


How would you create higher order components (hocs) in react.js?

448