adspace


What are the lifecycle steps of React?

Answer Posted / Vipin Dahiya

The main lifecycle methods in React are: `constructor()`, `getDerivedStateFromProps()`, `render()`, `componentDidMount()`, `shouldComponentUpdate(nextProps, nextState)`, `getSnapshotBeforeUpdate(prevProps, prevState)`, `componentDidUpdate(prevProps, prevState, snapshot)`, and `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 would you create higher order components (hocs) in react.js?

447


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

559