mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9f69c922cb
Summary: RCTBaseViewController uses RCTRootView.bridge to call RCTViewEventEmitter.emit. ## Changes - RCTEventDispatcher now exposes a method to dispatch RCTViewEventEmitter events. - RCTRootView (for paper), and RCTSurfaceHostingProxyRootView (for fabric and bridgeless mode) now exports the RCTEventDispatcher by grabbing it from the bridge - RCTBaseViewController now uses the event dispatcher exported from RCTRootView to dispatch the RCTViewEventEmitter event. ## Benefits - RCTBaseViewController no longer uses the bridge to dispatch RCTViewEventEmitter events - In the future, we'll make RCTSurfaceHostingProxyRootView work with bridgeless mode, which'll allow us to remove the bridge/bridgeless fork in RCTBaseViewController. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D30434884 fbshipit-source-id: d961a56ac2abc08a661f8fe7c37926f219b731d0