dillon1000/react

Commit

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.
Browse files
Changed paths2 files
First-parent comparison
M packages/react-dom/src/events/BeforeInputEventPlugin.js ModifiedM packages/react-dom/src/events/__tests__/BeforeInputEventPlugin-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…