dillon1000/react
Commit
Browse files Remove keyMirror in TopLevelTypes (#7597)
This is the last callsite of keyMirror! It removes 0.5k gzipped :) The only trick with this one is that ReactTestUtils actually iterates over the list of all the events. Instead of duplicating the logic, I used the $Enum feature of flow that lets us statically extract out the type from the dynamic value. Inside of react-dom we're no longer requiring the file directly so it doesn't bloat the file size, and we still get to have static typing, best of both worlds!
Changed paths16 files
First-parent comparisonsrc/renderers/dom/client/ReactBrowserEventEmitter.js ModifiedM src/renderers/dom/client/eventPlugins/BeforeInputEventPlugin.js ModifiedM src/renderers/dom/client/eventPlugins/ChangeEventPlugin.js ModifiedM src/renderers/dom/client/eventPlugins/EnterLeaveEventPlugin.js ModifiedM src/renderers/dom/client/eventPlugins/SelectEventPlugin.js ModifiedM src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js ModifiedM src/renderers/dom/client/eventPlugins/TapEventPlugin.js ModifiedM src/renderers/dom/client/eventPlugins/__tests__/EnterLeaveEventPlugin-test.js ModifiedM src/renderers/dom/client/eventPlugins/__tests__/SelectEventPlugin-test.js ModifiedM src/renderers/dom/client/wrappers/__tests__/ReactDOMInput-test.js ModifiedM src/renderers/dom/shared/ReactDOMComponent.js ModifiedM src/renderers/native/ReactNativeEventEmitter.js ModifiedM src/renderers/shared/stack/event/EventConstants.js ModifiedM src/renderers/shared/stack/event/EventPluginUtils.js ModifiedM src/renderers/shared/stack/event/eventPlugins/ResponderEventPlugin.js ModifiedM src/renderers/shared/stack/event/eventPlugins/__tests__/ResponderEventPlugin-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…