Skip to content

Commit 76b158b

Browse files
Drop RCT_EXPORT_METHOD from RCTLogBox TurboModule
Summary: Changelog: [Internal] `RCTLogBox` is a TurboModule: it conforms to `NativeLogBoxSpec` and implements `getTurboModule:` returning the codegen'd `...SpecJSI`. For TurboModules, the JS->ObjC dispatch is driven by codegen (the generated spec supplies the `selector` and argument kinds, invoked at runtime via `NSMethodSignature` / `NSInvocation`), not by the `RCT_EXPORT_METHOD` macro's `__rct_export__` metadata. The exported methods here are async-void with concrete parameter types (no generic `id` requiring `RCTConvert` coercion), so the macro is not functionally required. Convert them to plain ObjC method declarations; conformance to the codegen'd `NativeLogBoxSpec` protocol keeps compiler-enforced signature parity. Signature-only refactor with no change to the JS-facing API. Sync methods, methods with `id` params, and `constantsToExport` are intentionally left untouched. Differential Revision: D113579879
1 parent b04733e commit 76b158b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-native/React/CoreModules/RCTLogBox.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ - (void)setSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
3939
_bridgelessSurfacePresenter = surfacePresenter;
4040
}
4141

42-
RCT_EXPORT_METHOD(show)
42+
- (void)show
4343
{
4444
if (RCTRedBoxGetEnabled()) {
4545
__weak RCTLogBox *weakSelf = self;
@@ -63,7 +63,7 @@ - (void)setSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
6363
}
6464
}
6565

66-
RCT_EXPORT_METHOD(hide)
66+
- (void)hide
6767
{
6868
if (RCTRedBoxGetEnabled()) {
6969
__weak RCTLogBox *weakSelf = self;

0 commit comments

Comments
 (0)