Browse Source

More links to derived state

main
Dan Abramov 7 years ago
committed by GitHub
parent
commit
61f95acdf4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/blog/2018-03-29-react-v-16-3.md

2
content/blog/2018-03-29-react-v-16-3.md

@ -70,7 +70,7 @@ We recognize that this change will impact many existing components. Because of t
> Even in version 17, it will still be possible to use them, but they will be aliased with an "UNSAFE_" prefix to indicate that they might cause issues. We have also prepared an [automated script to rename them](https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles) in existing code.
In addition to deprecating unsafe lifecycles, we are also adding a couple of new lifecyles:
* [`getDerivedStateFromProps`](/docs/react-component.html#static-getderivedstatefromprops) is being added as a safer alternative to the legacy `componentWillReceiveProps`.
* [`getDerivedStateFromProps`](/docs/react-component.html#static-getderivedstatefromprops) is being added as a safer alternative to the legacy `componentWillReceiveProps`. (Note that [in most cases you don't need either of them](/blog/2018/06/07/you-probably-dont-need-derived-state.html).)
* [`getSnapshotBeforeUpdate`](/docs/react-component.html#getsnapshotbeforeupdate) is being added to support safely reading properties from e.g. the DOM before updates are made.
[Learn more about these lifecycle changes here.](/blog/2018/03/27/update-on-async-rendering.html)

Loading…
Cancel
Save