Below is my sample code
var Test = React.createClass({ componentDidMount: function(){ //do something } render: function() { return ( <div id="testDiv"> <Header messages={this.props.mesage} /> {this.props.children} <Footer /> </div> ); } }); I will do something in componentDidMount. When the this.props.children, the componentDidMount will not run, why?
How can I run function when this.props.children has changed every time?