mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Refactors `NativeEventEmitter` and `RCTDeviceEventEmitter` to be default exports. Changelog: [Internal] Reviewed By: RSNara Differential Revision: D22203918 fbshipit-source-id: 575b2baf1604d1a8a1bffd6d108c12f3f8415e0a
24 lines
559 B
JavaScript
24 lines
559 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import EventEmitter from '../../vendor/emitter/EventEmitter';
|
|
import RCTDeviceEventEmitter from '../RCTDeviceEventEmitter';
|
|
|
|
/**
|
|
* Mock the NativeEventEmitter as a normal JS EventEmitter.
|
|
*/
|
|
export default class NativeEventEmitter extends EventEmitter {
|
|
constructor() {
|
|
super(RCTDeviceEventEmitter.sharedSubscriber);
|
|
}
|
|
}
|