mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Drop RCT_EXPORT_METHOD from RCTLogBox TurboModule (#57677)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/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
This commit is contained in:
1 parent
051702f336
commit
4800be1d8b
1 file changed
+2
-2
@@ -39,7 +39,7 @@ RCT_EXPORT_MODULE()
|
||||
_bridgelessSurfacePresenter = surfacePresenter;
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(show)
|
||||
- (void)show
|
||||
{
|
||||
if (RCTRedBoxGetEnabled()) {
|
||||
__weak RCTLogBox *weakSelf = self;
|
||||
@@ -63,7 +63,7 @@ RCT_EXPORT_METHOD(show)
|
||||
}
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(hide)
|
||||
- (void)hide
|
||||
{
|
||||
if (RCTRedBoxGetEnabled()) {
|
||||
__weak RCTLogBox *weakSelf = self;
|
||||
|
||||
Reference in new issue
Block a user