UNPKG

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