|
warning( |
|
!props.contentEditable || props.children == null, |
|
'A component is `contentEditable` and contains `children` managed by ' + |
|
'React. It is now your responsibility to guarantee that none of ' + |
|
'those nodes are unexpectedly modified or duplicated. This is ' + |
|
'probably not intentional.' |
|
); |
React warns:
A component is contentEditable and contains children managed by
React. It is now your responsibility to guarantee that none of
those nodes are unexpectedly modified or duplicated. This is
probably not intentional.
I am writing a rich text editor using React, and have written it to ensure that the nodes are not modified by the browser by capturing all input events, performing the modifications on my internal document format, and re-rendering using React. However, on each render, React still warns me about this.
I would be awesome to be able to disable this warning somehow, such as with a specific value to the contentEditable prop, another name or something. I'm not sure the best approach to take here, so I thought I'd create an issue for discussion around this.
react/src/renderers/dom/shared/ReactDOMComponent.js
Lines 178 to 184 in 0e8db6b
React warns:
I am writing a rich text editor using React, and have written it to ensure that the nodes are not modified by the browser by capturing all input events, performing the modifications on my internal document format, and re-rendering using React. However, on each render, React still warns me about this.
I would be awesome to be able to disable this warning somehow, such as with a specific value to the contentEditable prop, another name or something. I'm not sure the best approach to take here, so I thought I'd create an issue for discussion around this.