mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
82187bfb6b
Summary: ## Rationale For every 1 call to RCTNetworking.sendRequest, we execute 6 calls to RCTNetworking.addListener. This is followed by at least one call to RCTNetworking.removeListeners. Aside from incrementing and decrementing the `_listeners` integer, these two methods accomplish nothing else: RCTNetworking doesn't implement the `startObserving` and `stopObserving` methods. This diff makes RCTEventEmitter dispatch events without looking at the listeners integer. In the future, this will allow us to stop making these ~8 unnecessary NativeModule calls for every Network request we send. Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D24272560 fbshipit-source-id: 7996eba5abfa4669a89c43a3ffa536c0faa214a8