Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
186
rated 0 times [  191] [ 5]  / answers: 1 / hits: 76722  / 5 Years ago, tue, february 26, 2019, 12:00:00

If state is true to play youtube video, and it is false I would like to delete youtube playing.
MY code is as follows.



{this.state.isPreViewVideo && <PlayYouTube video_id=ScSn235gQx0 />}


sandbox URL:



https://codesandbox.io/s/xryoz10k6o



Reproduction method:



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



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



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.


is there a way to avoid or resolve this error?


More From » reactjs

 Answers
7

This error, Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node, can also be raised if Google Translate is used (or any other plugin that changes the page DOM).



This is detailed in this Github issue: https://github.com/facebook/react/issues/11538


[#52532] Thursday, February 21, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jaredsages

Total Points: 273
Total Questions: 97
Total Answers: 105

Location: French Southern and Antarctic Lands
Member since Fri, Jan 6, 2023
1 Year ago
jaredsages questions
;