Using react-slider generates a react warning in strict mode:
Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
Please update the following components: ReactSlider
Issue seems to be located in ReactSlider.js line 388.
_proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(newProps) {
var value = sanitizeInValue(newProps.value);
if (!value.length) {
// eslint-disable-next-line prefer-destructuring
value = this.state.value;
} // ensure the array keeps the same size as `value`
this.tempArray = value.slice();
for (var i = 0; i < value.length; i += 1) {
this.state.value[i] = this.trimAlignValue(value[i], newProps);
}
if (this.state.value.length > value.length) {
this.state.value.length = value.length;
}
};
Description
Using react-slider generates a react warning in strict mode: