javascript-jp.dev
javascript
html
jquery
css
node.js
angular
typescript
reactjs
npm
arrays
Dark
lifecycle
[1/1]
React: useState、useReducer、getDerivedStateFromProps、componentWillReceiveProps の使い分け
概要React のライフサイクルメソッド componentWillReceiveProps と getDerivedStateFromProps は、コンポーネントのプロパティが変更されたときに実行されるメソッドです。しかし、それぞれの役割と使い方は異なります。
1