adspace


What is ComponentWillMount()?

Answer Posted / Rajendra Ram

ComponentWillMount() is a lifecycle method in React that was called just before the component was mounted to the DOM. As of React 16, it has been replaced by `getDerivedStateFromProps()`, and you should avoid using it in new code.

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