mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
delete hasBridge from root view api (#38870)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38870 ## Changelog: [iOS][Breaking] - hasBridge is removed from RCTRootView and RCTSurfaceHostingProxyRootView i'm looking to limit callsites to the bridge in new architecture. in GH search i didn't see anyone using this method. Reviewed By: cipolleschi Differential Revision: D48175886 fbshipit-source-id: 367bfd549f658a64c5f9defac6eb66b92e681216
This commit is contained in:
committed by
Facebook GitHub Bot
parent
269594ba92
commit
57b86f7a87
@@ -77,11 +77,6 @@ extern
|
||||
initialProperties:(nullable NSDictionary *)initialProperties
|
||||
launchOptions:(nullable NSDictionary *)launchOptions;
|
||||
|
||||
/**
|
||||
* This API allows RCTRootView users to know if the root view is backed by the bridge.
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL hasBridge;
|
||||
|
||||
/**
|
||||
* This API allows users of RCTRootView to access other NativeModules, without
|
||||
* directly accessing the bridge.
|
||||
|
||||
@@ -121,11 +121,6 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)hasBridge
|
||||
{
|
||||
return _bridge != nil;
|
||||
}
|
||||
|
||||
- (RCTModuleRegistry *)moduleRegistry
|
||||
{
|
||||
return _bridge.moduleRegistry;
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic, copy, readonly) NSString *moduleName;
|
||||
@property (nonatomic, strong, readonly) RCTBridge *bridge;
|
||||
@property (nonatomic, readonly) BOOL hasBridge;
|
||||
@property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
|
||||
@property (nonatomic, strong, readonly) id<RCTEventDispatcherProtocol> eventDispatcher;
|
||||
@property (nonatomic, copy, readwrite) NSDictionary *appProperties;
|
||||
|
||||
-5
@@ -113,11 +113,6 @@ static RCTRootViewSizeFlexibility convertToRootViewSizeFlexibility(RCTSurfaceSiz
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)hasBridge
|
||||
{
|
||||
return _bridge != nil;
|
||||
}
|
||||
|
||||
- (RCTModuleRegistry *)moduleRegistry
|
||||
{
|
||||
// In bridgeless mode, RCTSurfaceHostingProxyRootView is created with an RCTModuleRegistry
|
||||
|
||||
Reference in New Issue
Block a user