LoginSignup
2
1

More than 3 years have passed since last update.

React ビギナーズガイド時点からReact v16 までの差分

Last updated at Posted at 2019-10-17

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

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1