React ビギナーズガイドを読んでいるのだけれど、Reactのバージョンが古いせいでよくわからんので、違いをまとめることにした。
React ビギナーズガイド時点からDeprecationになった機能や差分
-
React.PropTypes
~15.5.0 Deprecated 16.0.0 Removed -
React.createClass
~15.6.0 Deprecated 16.0.0 Removed -
React.DOM
~15.6.0 Deprecated 16.0.0 Removed -
React.createMixin
~15.6.0 Deprecated -
react-with-addons.js
16.0.0 Removed -> you can install browser version via npm -
componentDidReceiveProps
16.1.0~ non-existent. occur warning.
If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate()
from link
React ビギナーズガイド時点から追加された機能
-
getDerivedStateFromProps()
16.3.0~ -
getSnapshotBeforeUpdate
lifecycle 16.3.0~ -
Hooks
16.8.0~
最終更新:2019/10/17