I am receving the following warning:
inWarning: `div` was passed a style object that has previously been mutated. Mutating `style` is deprecated. Consider clonin
You are not cloning the previewColorHover
var clone = Object.assign({}, this.styles.previewColorHover);
this.styles.previewColorHover = clone;
this.styles.previewColorHover.backgroundColor = this.state.selectedColor.hex
You are cloning the selectedColor object but not the style object.
do something as follows
var clone = Object.assign({}, this.state.selectedColor);
this.styles.previewColorHover.backgroundColor = clone.hex
var style = {};
style["previewColorHover"] = {backgroundColor : clone.hex}
and use the style object in the div as
<div ref='previewColor' id={'preview-color-' + this.props.id}
style={style.previewColorHover}>
</div>