dillon1000/react
Commit
Browse files Prevent BeforeInputPlugin from returning [null, null] (#11848)
The BeforeInputPlugin dispatches null elements in an array if composition or beforeInput events are not extracted. This causes a an extra array allocation, but more importantly creates null states in later event dispatch methods that are annoying to account for. This commit makes it so that BeforeInputPlugin never returns a null element inside an array.
Changed paths2 files
First-parent comparisonpackages/react-dom/src/events/BeforeInputEventPlugin.js ModifiedM packages/react-dom/src/events/__tests__/BeforeInputEventPlugin-test.internal.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…