Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
have RCTInstance decorate non-app provided turbomodules with bridgele…
…ss APIs Summary: Changelog: [Internal] `getModuleInstanceFromClass:` is a delegate method intended to be implemented by the product layer to provide modules. if it is not implemented to return a module for a given key, `RCTTurboModuleManager` will simply call `new` on the TM class. however, these two paths differentiate - for `getModuleInstanceFromClass:`, we will call `_attachBridgelessAPIsToModule:` which provides objects like surfacePresenter to the native module. if we fallback to calling `new`, then this attachment does not happen, even if the app has already been migrated to bridgeless modules. thus, the fix in the case is to lift the fallback into RCTInstance as well, and decorate the APIs onto the new fallback. Differential Revision: D66675034
- Loading branch information