-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make NativeModules.foo also load turbo modules (#47598)
Summary: Pull Request resolved: #47598 ## Changes Now: - in bridgeless, NativeModules.foo will also return turbo modules. And, global.__turboModuleProxy no longer exists. - in bridge, nothing changes. | **JS API** | **Bridge** | ***[Before]* Bridgeless** | ***[Before]* Bridgeless w/ Interop**| ***[After]* Bridgeless** | global.__turboModuleProxy | turbo modules | turbo modules | turbo modules |**deleted** | global.nativeModuleProxy | legacy modules | error | legacy modules | turbo + legacy modules ## Justification This reduces the cost for adopting the new architecture: - Prior, you had to migrate the module itself, **and** all its callsites: NativeModules.foo -> NativeFoo - Now, you have to migrate the module itself **only**. This simplifies the interop layer logic in bridgeless: all modules come from the same thing. Changelog: [General][Breaking] Bridgeless: Make NativeModules.foo load turbomodules (unset turboModuleProxy in bridgeless). Reviewed By: javache Differential Revision: D65896934 fbshipit-source-id: 10883c292b78759fceac5bd984e0cdf8a679fc67
- Loading branch information
1 parent
d1b0e9a
commit cc5f17d
Showing
2 changed files
with
69 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters