React DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node : <p>If state is true to play youtube video, and it is false I would like to delete youtube playing. 
MY code is as follows.</p>

<pre><code>{this.state.isPreViewVideo &amp;&amp; &lt;PlayYouTube video_id="ScSn235gQx0" /&gt;}
</code></pre>

<p>sandbox URL:</p>

<p><a href="https://codesandbox.io/s/xryoz10k6o" rel="noreferrer">https://codesandbox.io/s/xryoz10k6o</a></p>

<p>Reproduction method:</p>

<p>If 4-digit characters are included in input form, "isPreViewVideo: true" by setState  and if it is less than false</p>

<p>It works fine when state is true,
but when state is false, I encounter this error as follows.</p>

<pre><code>DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
</code></pre>

<p>is there a way to avoid or resolve this error?</p>
