componentWillReceiveProps Not Triggered After Mounting

componentWillReceiveProps isn't triggered after the node is put on scene. This is by design. Check out other lifecycle methods for the one that suits your needs.

The reason for that is because componentWillReceiveProps often handles the logic of comparing with the old props and acting upon changes; not triggering it at mounting (where there are no old props) helps in defining what the method does.

doc_React
2016-06-23 03:31:49
Comments
Leave a Comment

Please login to continue.