Skip to content

Commit 11654f0

Browse files
Drop RCT_EXPORT_METHOD from RCTDevToolsRuntimeSettingsModule TurboModule
Summary: Changelog: [Internal] `RCTDevToolsRuntimeSettingsModule` is a TurboModule: it conforms to `NativeReactDevToolsRuntimeSettingsModuleSpec` 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 `NativeReactDevToolsRuntimeSettingsModuleSpec` 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: D113579881
1 parent 37cd512 commit 11654f0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ @interface RCTDevToolsRuntimeSettingsModule () <NativeReactDevToolsRuntimeSettin
2525
@implementation RCTDevToolsRuntimeSettingsModule
2626
RCT_EXPORT_MODULE(ReactDevToolsRuntimeSettingsModule)
2727

28-
RCT_EXPORT_METHOD(
29-
setReloadAndProfileConfig : (JS::NativeReactDevToolsRuntimeSettingsModule::PartialReloadAndProfileConfig &)config)
28+
- (void)setReloadAndProfileConfig:(JS::NativeReactDevToolsRuntimeSettingsModule::PartialReloadAndProfileConfig &)config
3029
{
3130
if (config.shouldReloadAndProfile().has_value()) {
3231
_config.shouldReloadAndProfile = config.shouldReloadAndProfile().value();

0 commit comments

Comments
 (0)