diff --git a/src/renderers/dom/fiber/ReactDOMFiberComponent.js b/src/renderers/dom/fiber/ReactDOMFiberComponent.js index 7718b4e89ca9b..31430af92ee2c 100644 --- a/src/renderers/dom/fiber/ReactDOMFiberComponent.js +++ b/src/renderers/dom/fiber/ReactDOMFiberComponent.js @@ -439,7 +439,7 @@ var ReactDOMFiberComponent = { var firstChild = ((div.firstChild: any): HTMLScriptElement); domElement = div.removeChild(firstChild); } else if (props.is) { - domElement = ownerDocument.createElement(type, props.is); + domElement = ownerDocument.createElement(type, {is: props.is}); } else { // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. // See discussion in https://github.com/facebook/react/pull/6896 diff --git a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js index ca2ec1cf0079b..99bf0780925e2 100644 --- a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js +++ b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js @@ -1071,10 +1071,9 @@ describe('ReactDOMComponent', () => { var container = document.createElement('div'); spyOn(document, 'createElement').and.callThrough(); ReactDOM.render(
, container); - expect(document.createElement).toHaveBeenCalledWith( - 'div', - 'custom-div', - ); + expect(document.createElement).toHaveBeenCalledWith('div', { + is: 'custom-div', + }); } else { expect( ReactDOMServer.renderToString(), diff --git a/src/renderers/dom/stack/client/ReactDOMComponent.js b/src/renderers/dom/stack/client/ReactDOMComponent.js index 8b2e144e9c24a..91d84e906133b 100644 --- a/src/renderers/dom/stack/client/ReactDOMComponent.js +++ b/src/renderers/dom/stack/client/ReactDOMComponent.js @@ -552,7 +552,7 @@ ReactDOMComponent.Mixin = { div.innerHTML = `<${type}>${type}>`; el = div.removeChild(div.firstChild); } else if (props.is) { - el = ownerDocument.createElement(type, props.is); + el = ownerDocument.createElement(type, {is: props.is}); } else { // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. // See discussion in https://github.com/facebook/react/pull/6896