Remove write-only bridge from sample legacy modules (#59261)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/59261

RCTSampleLegacyModule on iOS and macOS stored a bridge that nothing reads. Delete the ivar and setter from both sample files.

Changelog:
[Internal]

Reviewed By: shwanton

Differential Revision: D126575656

fbshipit-source-id: 24554aa151537a14afd4f57ef8de5b5e465933c4
This commit is contained in:
Christoph Purrer authored and meta-codesync[bot] committed 2026-10-22 20:20:16 -07:00
1 parent 797882ef98
commit 2f6c4a43bd
1 file changed
+1 -8
@@ -7,9 +7,7 @@
#import "RCTSampleLegacyModule.h"
@implementation RCTSampleLegacyModule {
RCTBridge *_bridge;
}
@implementation RCTSampleLegacyModule
// Backward-compatible export
RCT_EXPORT_MODULE()
@@ -20,11 +18,6 @@ RCT_EXPORT_MODULE()
return YES;
}
- (void)setBridge:(RCTBridge *)bridge
{
_bridge = bridge;
}
- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();