1 | import { DeviceEventEmitter } from 'react-native';
|
2 | import { 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 | */
|
7 | class SyntheticPlatformEmitter {
|
8 | constructor() {
|
9 | this._emitter = new RCTEventEmitter(DeviceEventEmitter.sharedSubscriber);
|
10 | }
|
11 | emit(eventName, props) {
|
12 | this._emitter.emit(eventName, props);
|
13 | }
|
14 | }
|
15 | export default new SyntheticPlatformEmitter();
|
16 | //# sourceMappingURL=SyntheticPlatformEmitter.js.map |
\ | No newline at end of file |