mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changelog: [iOS][Internal] Refactor CxxBridge: Introduce RCTBridgeModuleDecorator to attach synthesize ivars to RCTTurboModules, in Bridge mode This doesn't change any logic. RCTBridgeModuleDecorator was created to consolidate several nearly identical implementations of the `attachInteropAPIsToModule` method to one place. Most importantly, it allows us to attach interop APIs in RCTBridgeModuleDecorator to RCTViewManagers in diff 4/4, using `attachInteropAPIsToModule`. Before this stack, these four synthesize ivars in RCTViewManagers are nil in Bridgeless mode, and point to instances in Bridge mode. # Context These are used in RCTBridgeModules to access APIs for view managers. These APIs are necessary and compatible with Bridgeless mode. * synthesize viewRegistry_DEPRECATED * synthesize bundleManager * synthesize callableJSModules * synthesize moduleRegistry Reviewed By: RSNara Differential Revision: D34437802 fbshipit-source-id: b773d511cf877d4896436fabf4893c978e5f8dd9