ReactJs warning: Mutating `style` is deprecated. Consider cloning it beforehand
<p>I am receving the following warning:</p>

<pre><code>inWarning: `div` was passed a style object that has previously been mutated. Mutating `style` is deprecated. Consider cloning it beforehand. Check the `render` of `xxx`. Previous style: {backgroundColor: "#000000"}. Mutated style: {backgroundColor: "#002a09"}. 
</code></pre>

<p>When trying to assign a style property to a div even after cloning the original object (I have also tried using JSON.parse(JSON.stringify()) with no sucess).</p>

<p>Could you tell me why I am receiving this error and how to fix it.</p>

<pre><code>   var clone = Object.assign({}, this.state.selectedColor);
   this.styles.previewColorHover.backgroundColor = clone.hex
</code></pre>

<p>in my render function:</p>

<pre><code>&lt;div ref='previewColor' id={'preview-color-' + this.props.id}
    style={this.styles.previewColorHover}&gt;
&lt;/div&gt;
</code></pre>