diff --git a/src/renderers/native/ReactIOS/IOSNativeBridgeEventPlugin.js b/src/renderers/native/ReactIOS/IOSNativeBridgeEventPlugin.js index 564e10f28c95b..7cc595d5d9392 100644 --- a/src/renderers/native/ReactIOS/IOSNativeBridgeEventPlugin.js +++ b/src/renderers/native/ReactIOS/IOSNativeBridgeEventPlugin.js @@ -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} diff --git a/src/renderers/native/ReactNative/ReactNativeEventEmitter.js b/src/renderers/native/ReactNative/ReactNativeEventEmitter.js index bf7179c2aeb3d..0018b63e55198 100644 --- a/src/renderers/native/ReactNative/ReactNativeEventEmitter.js +++ b/src/renderers/native/ReactNative/ReactNativeEventEmitter.js @@ -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; diff --git a/src/renderers/native/ReactNative/__mocks__/merge.js b/src/renderers/native/ReactNative/__mocks__/merge.js deleted file mode 100644 index 0c2dc8bf5de7a..0000000000000 --- a/src/renderers/native/ReactNative/__mocks__/merge.js +++ /dev/null @@ -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;