diff --git a/src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js b/src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js index 04dedf7871be..8e2e0267f182 100644 --- a/src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js +++ b/src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js @@ -112,9 +112,9 @@ describe('ReactDOM unknown attribute', () => { testUnknownAttributeRemoval(Symbol('foo')); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe( - 'Warning: Invalid prop `unknown` on
tag. Either remove this ' + - 'prop from the element, or pass a string or number value to keep it ' + - 'in the DOM. For details, see https://fb.me/react-unknown-prop\n' + + 'Warning: Invalid value for prop `unknown` on
tag. Either remove it ' + + 'from the element, or pass a string or number value to keep it ' + + 'in the DOM. For details, see https://fb.me/react-attribute-behavior\n' + ' in div (at **)', ); expectDev(console.error.calls.count()).toBe(1); @@ -125,10 +125,10 @@ describe('ReactDOM unknown attribute', () => { testUnknownAttributeRemoval(function someFunction() {}); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe( - 'Warning: Invalid prop `unknown` on
tag. Either remove this ' + - 'prop from the element, or pass a string or number value to ' + + 'Warning: Invalid value for prop `unknown` on
tag. Either remove ' + + 'it from the element, or pass a string or number value to ' + 'keep it in the DOM. For details, see ' + - 'https://fb.me/react-unknown-prop\n' + + 'https://fb.me/react-attribute-behavior\n' + ' in div (at **)', ); expectDev(console.error.calls.count()).toBe(1); diff --git a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js index ba21f482afbe..4d421ec861e6 100644 --- a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js +++ b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js @@ -148,9 +148,9 @@ describe('ReactDOMComponent', () => { ReactDOM.render(
{}} />, container); expectDev(console.error.calls.count(0)).toBe(1); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe( - 'Warning: Invalid prop `foo` on
tag. Either remove this prop ' + + 'Warning: Invalid value for prop `foo` on
tag. Either remove it ' + 'from the element, or pass a string or number value to keep ' + - 'it in the DOM. For details, see https://fb.me/react-unknown-prop' + + 'it in the DOM. For details, see https://fb.me/react-attribute-behavior' + '\n in div (at **)', ); }); @@ -161,9 +161,9 @@ describe('ReactDOMComponent', () => { ReactDOM.render(
{}} baz={() => {}} />, container); expectDev(console.error.calls.count(0)).toBe(1); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe( - 'Warning: Invalid props `foo`, `baz` on
tag. Either remove these ' + - 'props from the element, or pass a string or number value to keep ' + - 'them in the DOM. For details, see https://fb.me/react-unknown-prop' + + 'Warning: Invalid values for props `foo`, `baz` on
tag. Either remove ' + + 'them from the element, or pass a string or number value to keep ' + + 'them in the DOM. For details, see https://fb.me/react-attribute-behavior' + '\n in div (at **)', ); }); @@ -174,7 +174,7 @@ describe('ReactDOMComponent', () => { ReactDOM.render(
{}} />, container); expectDev(console.error.calls.count(0)).toBe(1); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe( - 'Warning: Unknown event handler property `onDblClick`. Did you mean `onDoubleClick`?\n in div (at **)', + 'Warning: Invalid event handler property `onDblClick`. Did you mean `onDoubleClick`?\n in div (at **)', ); }); @@ -1732,7 +1732,7 @@ describe('ReactDOMComponent', () => { 'Warning: Invalid DOM property `class`. Did you mean `className`?\n in div (at **)', ); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(1)[0])).toBe( - 'Warning: Unknown event handler property `onclick`. Did you mean ' + + 'Warning: Invalid event handler property `onclick`. Did you mean ' + '`onClick`?\n in input (at **)', ); }); @@ -1746,7 +1746,7 @@ describe('ReactDOMComponent', () => { 'Warning: Invalid DOM property `class`. Did you mean `className`?\n in div (at **)', ); expectDev(normalizeCodeLocInfo(console.error.calls.argsFor(1)[0])).toBe( - 'Warning: Unknown event handler property `onclick`. Did you mean ' + + 'Warning: Invalid event handler property `onclick`. Did you mean ' + '`onClick`?\n in input (at **)', ); }); @@ -2115,7 +2115,7 @@ describe('ReactDOMComponent', () => { expect(el.hasAttribute('whatever')).toBe(false); expectDev(console.error.calls.argsFor(0)[0]).toContain( - 'Warning: Invalid prop `whatever` on
tag', + 'Warning: Invalid value for prop `whatever` on
tag', ); }); @@ -2186,7 +2186,7 @@ describe('ReactDOMComponent', () => { expect(el.hasAttribute('whatever')).toBe(false); expectDev(console.error.calls.argsFor(0)[0]).toContain( - 'Warning: Invalid prop `whatever` on
tag.', + 'Warning: Invalid value for prop `whatever` on
tag.', ); }); diff --git a/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js b/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js index f49442ccf3d4..4231bb1f37b5 100644 --- a/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js +++ b/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js @@ -73,7 +73,7 @@ if (__DEV__) { if (registrationName != null) { warning( false, - 'Unknown event handler property `%s`. Did you mean `%s`?%s', + 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum(debugID), @@ -234,9 +234,9 @@ var warnUnknownProperties = function(type, props, debugID) { if (unknownProps.length === 1) { warning( false, - 'Invalid prop %s on <%s> tag. Either remove this prop from the element, ' + + 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + - 'For details, see https://fb.me/react-unknown-prop%s', + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum(debugID), @@ -244,9 +244,9 @@ var warnUnknownProperties = function(type, props, debugID) { } else if (unknownProps.length > 1) { warning( false, - 'Invalid props %s on <%s> tag. Either remove these props from the element, ' + + 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + - 'For details, see https://fb.me/react-unknown-prop%s', + 'For details, see https://fb.me/react-attribute-behavior%s', unknownPropString, type, getStackAddendum(debugID),