Use spread instead of deprecated merge utility (#6634)

(cherry picked from commit 72ba5971ae)
This commit is contained in:
Sebastian Markbåge
2016-04-27 19:54:40 -07:00
committed by Paul O’Shannessy
parent 0008beb1fb
commit 64acaca8ee
3 changed files with 5 additions and 23 deletions
@@ -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;
@@ -38,7 +37,7 @@ for (var directTypeName in customDirectEventTypes) {
var IOSNativeBridgeEventPlugin = {
eventTypes: merge(customBubblingEventTypes, customDirectEventTypes),
eventTypes: { ...customBubblingEventTypes, ...customDirectEventTypes },
/**
* @see {EventPluginHub.extractEvents}
@@ -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;
@@ -91,7 +90,9 @@ var removeTouchesAtIndices = function(
*
* @internal
*/
var ReactNativeEventEmitter = merge(ReactEventEmitterMixin, {
var ReactNativeEventEmitter = {
...ReactEventEmitterMixin,
registrationNames: EventPluginRegistry.registrationNameModules,
@@ -218,6 +219,6 @@ var ReactNativeEventEmitter = merge(ReactEventEmitterMixin, {
);
}
},
});
};
module.exports = ReactNativeEventEmitter;
@@ -1,18 +0,0 @@
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
// TODO: Replace all callers with spread
var merge = function(a, b) {
return {...a, ...b};
};
module.exports = merge;