dillon1000/react
Commit
Browse files Warn early for non-functional event listeners (#10453)
* Add early warning for non-functional event listeners * Use functional listeners in ReactDOMComponent test To avoid triggering the non-functional event listener component * spy on console.error in non-function EventPluginHub test This should warn from ReactDOMFiberComponent, but we just ignore it here * Remove redundant check for listener * Add expectation for non-functional listener warning in EventPluginHub * Hoist listener typeof check in hot paths * Include stack addendum in non-functional listener warning * Make it pretty * Remove it.onnly from ReactDOMFiber test * Fix message * Update expected message * Change invariant message to match the new style * Fix remaining warning
Changed paths5 files
First-parent comparisonsrc/renderers/__tests__/EventPluginHub-test.js ModifiedM src/renderers/dom/fiber/ReactDOMFiberComponent.js ModifiedM src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js ModifiedM src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js ModifiedM src/renderers/shared/shared/event/EventPluginHub.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…