UNPKG

565 BJavaScriptView Raw
1import { DeviceEventEmitter } from 'react-native';
2import { RCTEventEmitter } from './nativeEmitters';
3/**
4 * This emitter is used for sending synthetic native events to listeners
5 * registered in the API layer with `NativeEventEmitter`.
6 */
7class SyntheticPlatformEmitter {
8 constructor() {
9 this._emitter = new RCTEventEmitter(DeviceEventEmitter.sharedSubscriber);
10 }
11 emit(eventName, props) {
12 this._emitter.emit(eventName, props);
13 }
14}
15export default new SyntheticPlatformEmitter();
16//# sourceMappingURL=SyntheticPlatformEmitter.js.map
\No newline at end of file