Skip to content

Commit

Permalink
delete hasBridge from root view api (#38870)
Browse files Browse the repository at this point in the history
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: f10481d342bb23792af9af390b5f8162b5ba2db5
  • Loading branch information
philIip authored and facebook-github-bot committed Aug 22, 2023
1 parent 4f7cdd5 commit 7690e8c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions packages/react-native/React/Base/RCTRootView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 0 additions & 5 deletions packages/react-native/React/Base/RCTRootView.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ - (UIView *)view
return self;
}

- (BOOL)hasBridge
{
return _bridge != nil;
}

- (RCTModuleRegistry *)moduleRegistry
{
return _bridge.moduleRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ - (instancetype)initWithSurface:(id<RCTSurfaceProtocol>)surface
return self;
}

- (BOOL)hasBridge
{
return _bridge != nil;
}

- (RCTModuleRegistry *)moduleRegistry
{
// In bridgeless mode, RCTSurfaceHostingProxyRootView is created with an RCTModuleRegistry
Expand Down

0 comments on commit 7690e8c

Please sign in to comment.