Skip to content

Instantly share code, notes, and snippets.

@hlodver
Created September 3, 2019 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hlodver/ee336b071f2b2b85c4903660fb8cd686 to your computer and use it in GitHub Desktop.
Save hlodver/ee336b071f2b2b85c4903660fb8cd686 to your computer and use it in GitHub Desktop.
diff --git a/node_modules/react-color/lib/components/chrome/ChromeFields.js b/node_modules/react-color/lib/components/chrome/ChromeFields.js
index 88e5c3d..4236a1e 100644
--- a/node_modules/react-color/lib/components/chrome/ChromeFields.js
+++ b/node_modules/react-color/lib/components/chrome/ChromeFields.js
@@ -121,8 +121,8 @@ var ChromeFields = exports.ChromeFields = function (_React$Component) {
}
}
}, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
+ key: 'UNSAFE_componentWillReceiveProps',
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.hsl.a !== 1 && this.state.view === 'hex') {
this.setState({ view: 'rgb' });
}
diff --git a/node_modules/react-color/lib/components/common/ColorWrap.js b/node_modules/react-color/lib/components/common/ColorWrap.js
index 603589f..a916e70 100644
--- a/node_modules/react-color/lib/components/common/ColorWrap.js
+++ b/node_modules/react-color/lib/components/common/ColorWrap.js
@@ -65,8 +65,8 @@ var ColorWrap = exports.ColorWrap = function ColorWrap(Picker) {
}
_createClass(ColorPicker, [{
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
+ key: 'UNSAFE_componentWillReceiveProps',
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
this.setState(_extends({}, _color2.default.toState(nextProps.color, this.state.oldHue)));
}
}, {
diff --git a/node_modules/react-color/lib/components/common/EditableInput.js b/node_modules/react-color/lib/components/common/EditableInput.js
index bfd8347..eede584 100644
--- a/node_modules/react-color/lib/components/common/EditableInput.js
+++ b/node_modules/react-color/lib/components/common/EditableInput.js
@@ -110,8 +110,8 @@ var EditableInput = exports.EditableInput = function (_ref) {
}
_createClass(EditableInput, [{
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
+ key: 'UNSAFE_componentWillReceiveProps',
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
var input = this.input;
if (nextProps.value !== this.state.value) {
if (input === document.activeElement) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment