diff --git a/src/renderers/dom/shared/ReactDOMComponent.js b/src/renderers/dom/shared/ReactDOMComponent.js index f4a95edbe0259..3e789d33b14ac 100644 --- a/src/renderers/dom/shared/ReactDOMComponent.js +++ b/src/renderers/dom/shared/ReactDOMComponent.js @@ -187,6 +187,13 @@ function assertValidProps(component, props) { 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.' ); + warning( + props.onFocusIn == null && + props.onFocusOut == null, + 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + + 'are not needed/supported by React.' + ); } invariant( props.style == null || typeof props.style === 'object', diff --git a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js index 7233f16cc5fc0..2fb18a526323b 100644 --- a/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js +++ b/src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js @@ -1234,5 +1234,17 @@ describe('ReactDOMComponent', function() { expect(console.error.argsForCall.length).toBe(1); expect(console.error.argsForCall[0][0]).toContain('className'); }); + + it('should warn about props that are no longer supported', function() { + spyOn(console, 'error'); + ReactTestUtils.renderIntoDocument(
); + expect(console.error.argsForCall.length).toBe(0); + + ReactTestUtils.renderIntoDocument(