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.
767 B
767 B
id | title | layout | permalink | prev | next |
---|---|---|---|---|---|
componentWillReceiveProps-not-triggered-after-mounting-tip | componentWillReceiveProps not triggered after mounting | cookbook | componentWillReceiveProps-not-triggered-after-mounting-tip.html | controlled-input-null-value.html | props-in-getInitialSate-as-anti-pattern.html |
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.