react-native-macos/React/Modules
Ramanpreet Nara 82187bfb6b Dispatch events even when there are no listeners
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
2020-10-14 21:05:38 -07:00
..
RCTEventEmitter.h Dispatch events even when there are no listeners 2020-10-14 21:05:38 -07:00
RCTEventEmitter.m Dispatch events even when there are no listeners 2020-10-14 21:05:38 -07:00
RCTI18nUtil.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTI18nUtil.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTLayoutAnimation.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTLayoutAnimation.m remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
RCTLayoutAnimationGroup.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTLayoutAnimationGroup.m Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTRedBoxExtraDataViewController.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTRedBoxExtraDataViewController.m remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
RCTSurfacePresenterStub.h Remove integration between Paper and Fabric's UIManager 2020-06-29 15:26:31 -07:00
RCTSurfacePresenterStub.m Fabric: Fixing incorrect retaining policy for RCTSurfacePreseter (crash in RCTNativeAnimatedModule) 2020-01-13 13:36:36 -08:00
RCTUIManager.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTUIManager.m Make RCTEventDispatcher TurboModule-compatible 2020-10-14 02:40:10 -07:00
RCTUIManagerObserverCoordinator.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTUIManagerObserverCoordinator.mm Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTUIManagerUtils.h Clang format for all React Native files 2020-03-08 23:01:17 -07:00
RCTUIManagerUtils.m Fix Xcode warnings in React-Core pod (#29622) 2020-09-09 12:48:09 -07:00