adspace


Why is a component constructor called only once?

Answer Posted / Tripti Agarwal

A React.js component's constructor is called only once during the initial rendering of the component. This ensures that the state of the component can be initialized and any binding to event handlers can occur just once.

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?

448


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

565