Browse Source

Fix broken link on componentWillReceiveProps tip

main
Paul O’Shannessy 11 years ago
parent
commit
55b5cfe075
  1. 2
      tips/09-componentWillReceiveProps-not-triggered-after-mounting.md

2
tips/09-componentWillReceiveProps-not-triggered-after-mounting.md

@ -7,6 +7,6 @@ prev: controlled-input-null-value.html
next: props-in-getInitialState-as-anti-pattern.html next: props-in-getInitialState-as-anti-pattern.html
--- ---
`componentWillReceiveProps` isn't triggered after the node is put on scene. This is by design. Check out [other lifecycle methods](/react/docs/tips/component-specs.html) for the one that suits your needs. `componentWillReceiveProps` isn't triggered after the node is put on scene. This is by design. Check out [other lifecycle methods](/react/docs/component-specs.html) 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. 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.

Loading…
Cancel
Save