mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3f38186b78
Summary: We're making the getTurboModule: method required for all classes that conform to RCTTurboModule. Many of our ObjC-only and Cxx NativeModules don't implement this method. This diff implements a getTurboModule: method on all those modules that returns nullptr. **Question:** Why is it fine to make ObjC-only NativeModules return nullptr from their getTurboModule: method? - Because they're only accessed from ObjC, and should appear as null on the JavaScript side. Longer term, these NativeModules will also go away. **Question:** Why is it fine to make Cxx NativeModules return nullptr from getTurboModule: method? - Because after D27316872, the TurboModuleManager checks if the module is a CxxModule first. If it is, we do an early return, and never call the module's getTurboModule: method. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D27316871 fbshipit-source-id: bc693f2927ab3b0de24e6e9e7699390ec0f7d729