Skip to content

Commit 57b86f7

Browse files
philIipfacebook-github-bot
authored andcommitted
delete hasBridge from root view api (#38870)
Summary: Pull Request resolved: #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
1 parent 269594b commit 57b86f7

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

packages/react-native/React/Base/RCTRootView.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ extern
7777
initialProperties:(nullable NSDictionary *)initialProperties
7878
launchOptions:(nullable NSDictionary *)launchOptions;
7979

80-
/**
81-
* This API allows RCTRootView users to know if the root view is backed by the bridge.
82-
*/
83-
@property (nonatomic, readonly) BOOL hasBridge;
84-
8580
/**
8681
* This API allows users of RCTRootView to access other NativeModules, without
8782
* directly accessing the bridge.

packages/react-native/React/Base/RCTRootView.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ - (UIView *)view
121121
return self;
122122
}
123123

124-
- (BOOL)hasBridge
125-
{
126-
return _bridge != nil;
127-
}
128-
129124
- (RCTModuleRegistry *)moduleRegistry
130125
{
131126
return _bridge.moduleRegistry;

packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ NS_ASSUME_NONNULL_BEGIN
2727

2828
@property (nonatomic, copy, readonly) NSString *moduleName;
2929
@property (nonatomic, strong, readonly) RCTBridge *bridge;
30-
@property (nonatomic, readonly) BOOL hasBridge;
3130
@property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
3231
@property (nonatomic, strong, readonly) id<RCTEventDispatcherProtocol> eventDispatcher;
3332
@property (nonatomic, copy, readwrite) NSDictionary *appProperties;

packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@ - (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
113113
return self;
114114
}
115115

116-
- (BOOL)hasBridge
117-
{
118-
return _bridge != nil;
119-
}
120-
121116
- (RCTModuleRegistry *)moduleRegistry
122117
{
123118
// In bridgeless mode, RCTSurfaceHostingProxyRootView is created with an RCTModuleRegistry

0 commit comments

Comments
 (0)