mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e0ece12203
Summary: While investigating a bridgeless networking issue, I noticed something very peculiar. **Two** networking turbo modules are built and used in bridgeless mode. Upon debugging, I realized that each of them have a different `TurboModuleHolder`. The reason is the following: 1. In JS, the module's name is [Networking](https://fburl.com/diffusion/f2xu4wie) 2. In ObjC, we call the module "RCTNetworking" (examples in this diff) 3. Both scenarios end up creating the correct Turbo Module: [RCTNetworking](https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/Libraries/Network/RCTNetworking.mm?link_ref=search), but the `TurboModuleHolder` doesn't know that "RCTNetworking" and "Networking" are the same. Any other modules accessed this way will have the same issue. An alternative solution would be to tell `TurboModuleHolder` to strip the `RCT` suffix, which would solve the problem globally. RSNara thoughts? Changelog: [Internal] Reviewed By: RSNara Differential Revision: D25477044 fbshipit-source-id: 02219de578ef4d19e579110e4242883a30cefcd6