diff --git a/src/renderers/dom/client/ReactMount.js b/src/renderers/dom/client/ReactMount.js index ea62047b0a..641c181455 100644 --- a/src/renderers/dom/client/ReactMount.js +++ b/src/renderers/dom/client/ReactMount.js @@ -382,11 +382,11 @@ var ReactMount = { 'ReactDOM.render(): Invalid component element.%s', ( typeof nextElement === 'string' ? - ' Instead of passing an element string, make sure to instantiate ' + - 'it by passing it to React.createElement.' : + ' Instead of passing a string like \'div\', pass ' + + 'React.createElement(\'div\') or
.' : typeof nextElement === 'function' ? - ' Instead of passing a component class, make sure to instantiate ' + - 'it by passing it to React.createElement.' : + ' Instead of passing a class like Foo, pass ' + + 'React.createElement(Foo) or .' : // Check if it quacks like an element nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + diff --git a/src/renderers/dom/client/__tests__/ReactMount-test.js b/src/renderers/dom/client/__tests__/ReactMount-test.js index 4c0f2a5e23..06b1c16415 100644 --- a/src/renderers/dom/client/__tests__/ReactMount-test.js +++ b/src/renderers/dom/client/__tests__/ReactMount-test.js @@ -54,9 +54,8 @@ describe('ReactMount', function() { expect(function() { ReactTestUtils.renderIntoDocument('div'); }).toThrow( - 'ReactDOM.render(): Invalid component element. Instead of passing an ' + - 'element string, make sure to instantiate it by passing it to ' + - 'React.createElement.' + 'ReactDOM.render(): Invalid component element. Instead of passing a ' + + 'string like \'div\', pass React.createElement(\'div\') or
.' ); }); @@ -70,8 +69,7 @@ describe('ReactMount', function() { ReactTestUtils.renderIntoDocument(Component); }).toThrow( 'ReactDOM.render(): Invalid component element. Instead of passing a ' + - 'component class, make sure to instantiate it by passing it to ' + - 'React.createElement.' + 'class like Foo, pass React.createElement(Foo) or .' ); });