Skip to content

Commit 18216ec

Browse files
Drop RCT_EXPORT_METHOD from RCTRedBox TurboModule
Summary: Changelog: [Internal] `RCTRedBox` is a TurboModule: it conforms to `NativeRedBoxSpec` 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 `NativeRedBoxSpec` 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: D113579880
1 parent 76b158b commit 18216ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ - (void)loadExtraDataViewController
222222
});
223223
}
224224

225-
RCT_EXPORT_METHOD(setExtraData : (NSDictionary *)extraData forIdentifier : (NSString *)identifier)
225+
- (void)setExtraData:(NSDictionary *)extraData forIdentifier:(NSString *)identifier
226226
{
227227
[_extraDataViewController addExtraData:extraData forIdentifier:identifier];
228228
}
229229

230-
RCT_EXPORT_METHOD(dismiss)
230+
- (void)dismiss
231231
{
232232
dispatch_async(dispatch_get_main_queue(), ^{
233233
[self->_controller dismiss];

0 commit comments

Comments
 (0)