mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d39643b9de
Summary: Rewrites `NativeEventEmitter` to not extend `EventEmitter` and to compose `RCTDeviceEventEmitter` instead of (mis)using its exported `sharedSubscriber` property. This makes it easier to reason about `NativeEventEmitter`. Also, the extraneous methods on `EventEmitter` are no longer inherited. Changelog: [General][Removed] - `NativeEventEmitter` no longer inherits from `EventEmitter`, so it no longer implements `removeListener` and `removeSubscription`. Instead, use the `remove()` method on the subscription object returned by `addListener`. Reviewed By: rubennorte Differential Revision: D26163562 fbshipit-source-id: c1aadb99bdefbaa36fece57ce74604e414f94d4d