diff --git a/packages/react-json-tree/src/JSONNestedNode.js b/packages/react-json-tree/src/JSONNestedNode.js index e19aa253..2c3afcac 100644 --- a/packages/react-json-tree/src/JSONNestedNode.js +++ b/packages/react-json-tree/src/JSONNestedNode.js @@ -109,7 +109,7 @@ export default class JSONNestedNode extends React.Component { this.state = getStateFromProps(props); } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { const nextState = getStateFromProps(nextProps); if (getStateFromProps(this.props).expanded !== nextState.expanded) { this.setState(nextState); diff --git a/packages/react-json-tree/src/index.js b/packages/react-json-tree/src/index.js index 0fe936bd..e7504eb7 100644 --- a/packages/react-json-tree/src/index.js +++ b/packages/react-json-tree/src/index.js @@ -110,7 +110,7 @@ export default class JSONTree extends React.Component { this.state = getStateFromProps(props); } - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { if (['theme', 'invertTheme'].find(k => nextProps[k] !== this.props[k])) { this.setState(getStateFromProps(nextProps)); }