Skip to content

Commit 4800be1

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Drop RCT_EXPORT_METHOD from RCTLogBox TurboModule (#57677)
Summary: Pull Request resolved: #57677 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. Reviewed By: cortinico Differential Revision: D113579879 fbshipit-source-id: 4daee6576539c65c54394e9250e1799f611099b2
1 parent 051702f commit 4800be1

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)