diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js index e9398cf076f61..e2ba29ceb3aed 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js @@ -45,6 +45,7 @@ import { updateTextarea, restoreControlledTextareaState, } from './ReactDOMTextarea'; +import {validateTextNesting} from './validateDOMNesting'; import {track} from './inputValueTracking'; import setInnerHTML from './setInnerHTML'; import setTextContent from './setTextContent'; @@ -279,6 +280,9 @@ function setProp( switch (key) { case 'children': { if (typeof value === 'string') { + if (__DEV__) { + validateTextNesting(value, tag); + } // Avoid setting initial textContent when the text is empty. In IE11 setting // textContent on a