From e02d5e1ddfcf4952740211b5a0f432fd5a2f63a1 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 22 Apr 2018 12:55:53 -0700 Subject: [PATCH] Add TODOs when upgrading to React@16.3 --- components/Carbon.js | 1 + components/ImagePicker.js | 1 + 2 files changed, 2 insertions(+) diff --git a/components/Carbon.js b/components/Carbon.js index 880250d..365fb90 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -39,6 +39,7 @@ class Carbon extends PureComponent { } componentWillReceiveProps(newProps) { + // TODO use getDerivedStateFromProps() on React@16.3 this.handleLanguageChange(newProps.children, { customProps: newProps }) } diff --git a/components/ImagePicker.js b/components/ImagePicker.js index b42b83f..8a076dd 100644 --- a/components/ImagePicker.js +++ b/components/ImagePicker.js @@ -46,6 +46,7 @@ export default class extends React.Component { } componentWillReceiveProps(nextProps) { + // TODO use getDerivedStateFromProps() on React@16.3 if (this.state.crop && this.props.aspectRatio !== nextProps.aspectRatio) { // update crop for editor container aspect-ratio change this.setState({