Skip to content

Commit 50c2111

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Drop RCT_EXPORT_METHOD from RCTDevLoadingView TurboModule (#57680)
Summary: Pull Request resolved: #57680 Changelog: [Internal] `RCTDevLoadingView` is a TurboModule: it conforms to `NativeDevLoadingViewSpec` 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 `NativeDevLoadingViewSpec` 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: D113579873 fbshipit-source-id: 78a43f3586b2b7433fad1ab13be50fae63197870
1 parent dc93ed0 commit 50c2111

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,17 @@ - (void)showMessage:(NSString *)message
244244
});
245245
}
246246

247-
RCT_EXPORT_METHOD(
248-
showMessage : (NSString *)message withColor : (NSNumber *__nonnull)color withBackgroundColor : (NSNumber *__nonnull)
249-
backgroundColor withDismissButton : (NSNumber *)dismissButton)
247+
- (void)showMessage:(NSString *)message
248+
withColor:(NSNumber *__nonnull)color
249+
withBackgroundColor:(NSNumber *__nonnull)backgroundColor
250+
withDismissButton:(NSNumber *)dismissButton
250251
{
251252
[self showMessage:message
252253
color:[RCTConvert UIColor:color]
253254
backgroundColor:[RCTConvert UIColor:backgroundColor]
254255
dismissButton:[dismissButton boolValue]];
255256
}
256-
RCT_EXPORT_METHOD(hide)
257+
- (void)hide
257258
{
258259
if (!RCTDevLoadingViewGetEnabled()) {
259260
return;

0 commit comments

Comments
 (0)