Skip to content

Commit

Permalink
Use spread instead of deprecated merge utility (#6634)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Apr 28, 2016
1 parent b8f8360 commit 72ba597
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
3 changes: 1 addition & 2 deletions src/renderers/native/ReactIOS/IOSNativeBridgeEventPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ var EventPropagators = require('EventPropagators');
var SyntheticEvent = require('SyntheticEvent');
var UIManager = require('UIManager');

var merge = require('merge');
var warning = require('warning');

var customBubblingEventTypes = UIManager.customBubblingEventTypes;
Expand All @@ -38,7 +37,7 @@ for (var directTypeName in customDirectEventTypes) {

var IOSNativeBridgeEventPlugin = {

eventTypes: merge(customBubblingEventTypes, customDirectEventTypes),
eventTypes: { ...customBubblingEventTypes, ...customDirectEventTypes },

/**
* @see {EventPluginHub.extractEvents}
Expand Down
7 changes: 4 additions & 3 deletions src/renderers/native/ReactNative/ReactNativeEventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var ReactNativeTagHandles = require('ReactNativeTagHandles');
var ReactUpdates = require('ReactUpdates');
var EventConstants = require('EventConstants');

var merge = require('merge');
var warning = require('warning');

var topLevelTypes = EventConstants.topLevelTypes;
Expand Down Expand Up @@ -91,7 +90,9 @@ var removeTouchesAtIndices = function(
*
* @internal
*/
var ReactNativeEventEmitter = merge(ReactEventEmitterMixin, {
var ReactNativeEventEmitter = {

...ReactEventEmitterMixin,

registrationNames: EventPluginRegistry.registrationNameModules,

Expand Down Expand Up @@ -218,6 +219,6 @@ var ReactNativeEventEmitter = merge(ReactEventEmitterMixin, {
);
}
},
});
};

module.exports = ReactNativeEventEmitter;
18 changes: 0 additions & 18 deletions src/renderers/native/ReactNative/__mocks__/merge.js

This file was deleted.

0 comments on commit 72ba597

Please sign in to comment.