-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modularlize RCTBridgeModule.h 3/n - Move RCTTurboModuleRegistry.h to …
…its own file in ReactInternal target (#34514) Summary: Pull Request resolved: #34514 Changelog: [Internal][iOS] Modularlize RCTBridgeModule.h 3/n - Move RCTTurboModuleRegistry.h to its own file in ReactInternal target # Why clean up RCTBridgeModule.h? Clean up one unnecessary import of RCTBridgeModule.h. RCTBridgeModule includes a lot of header files, and this header is imported everywhere. The ultimate goal is that files (especially React Native infra files) should only import only what they need and not import the entirety of RCTBridgeModule.h whenever possible. This way, certain headers that are Bridge-only can be compiled out of the new architecture with a flag. Reviewed By: RSNara Differential Revision: D38971168 fbshipit-source-id: 3b1b23d422f965a5a14bc4178d32b844906f2c8b
- Loading branch information
1 parent
3e97d5f
commit 4e70376
Showing
7 changed files
with
39 additions
and
35 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** | ||
* A protocol that allows TurboModules to do lookup on other TurboModules. | ||
* Calling these methods may cause a module to be synchronously instantiated. | ||
*/ | ||
@protocol RCTTurboModuleRegistry <NSObject> | ||
- (id)moduleForName:(const char *)moduleName; | ||
|
||
/** | ||
* Rationale: | ||
* When TurboModules lookup other modules by name, we first check the TurboModule | ||
* registry to see if a TurboModule exists with the respective name. In this case, | ||
* we don't want a RedBox to be raised if the TurboModule isn't found. | ||
* | ||
* This method is deprecated and will be deleted after the migration from | ||
* TurboModules to TurboModules is complete. | ||
*/ | ||
- (id)moduleForName:(const char *)moduleName warnOnLookupFailure:(BOOL)warnOnLookupFailure; | ||
- (BOOL)moduleIsInitialized:(const char *)moduleName; | ||
|
||
- (NSArray<NSString *> *)eagerInitModuleNames; | ||
- (NSArray<NSString *> *)eagerInitMainQueueModuleNames; | ||
@end |
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
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