You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
653 B
653 B
id | title | layout | permalink |
---|---|---|---|
componentWillReceiveProps-not-triggered-after-mounting | componentWillReceiveProps not triggered after mounting | docs | componentWillReceiveProps-not-triggered-after-mounting.html |
Problem
componentWillReceiveProps
isn't triggered after the node is put on scene.
Solution
This is by design. Checkout other lifecycle methods for the one that suits your needs.
Discussion
componentWillReceiveProps
often handles the logic of comparing with the old props and act upon changes; not triggering it at mounting, where there are no old props, clearly defines what the method should do.