Add TODOs when upgrading to React@16.3

main
Mike Fix 7 years ago
parent b9c91c5e48
commit e02d5e1ddf

@ -39,6 +39,7 @@ class Carbon extends PureComponent {
} }
componentWillReceiveProps(newProps) { componentWillReceiveProps(newProps) {
// TODO use getDerivedStateFromProps() on React@16.3
this.handleLanguageChange(newProps.children, { customProps: newProps }) this.handleLanguageChange(newProps.children, { customProps: newProps })
} }

@ -46,6 +46,7 @@ export default class extends React.Component {
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
// TODO use getDerivedStateFromProps() on React@16.3
if (this.state.crop && this.props.aspectRatio !== nextProps.aspectRatio) { if (this.state.crop && this.props.aspectRatio !== nextProps.aspectRatio) {
// update crop for editor container aspect-ratio change // update crop for editor container aspect-ratio change
this.setState({ this.setState({

Loading…
Cancel
Save