diff --git a/packages/react-native/React/Base/RCTConstants.h b/packages/react-native/React/Base/RCTConstants.h index 72bbb0f7b5ce..185f57f4881f 100644 --- a/packages/react-native/React/Base/RCTConstants.h +++ b/packages/react-native/React/Base/RCTConstants.h @@ -44,6 +44,7 @@ RCT_EXTERN NSString *const RCTJavaScriptDidFailToLoadNotification; * the `[bridge moduleForClass:]` method. */ RCT_EXTERN NSString *const RCTDidInitializeModuleNotification; +RCT_EXTERN NSString *const RCTDidInitializeModuleNotificationModuleKey; /* * W3C Pointer Events diff --git a/packages/react-native/React/Base/RCTConstants.m b/packages/react-native/React/Base/RCTConstants.m index eb90640789f6..3c2acc59c084 100644 --- a/packages/react-native/React/Base/RCTConstants.m +++ b/packages/react-native/React/Base/RCTConstants.m @@ -20,6 +20,7 @@ NSString *const RCTJavaScriptWillStartLoadingNotification = @"RCTJavaScriptWillStartLoadingNotification"; NSString *const RCTDidInitializeModuleNotification = @"RCTDidInitializeModuleNotification"; +NSString *const RCTDidInitializeModuleNotificationModuleKey = @"module"; NSString *const RCTNotifyEventDispatcherObserversOfEvent_DEPRECATED = @"RCTNotifyEventDispatcherObserversOfEvent_DEPRECATED"; diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm index 0078a1a826a3..c5368ea8842f 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm @@ -726,9 +726,10 @@ - (BOOL)_shouldCreateObjCModule:(Class)moduleClass * TODO(T41180176): Investigate whether we can delete this after TM * rollout. */ - [[NSNotificationCenter defaultCenter] postNotificationName:RCTDidInitializeModuleNotification - object:nil - userInfo:@{@"module" : module, @"bridge" : [NSNull null]}]; + [[NSNotificationCenter defaultCenter] + postNotificationName:RCTDidInitializeModuleNotification + object:nil + userInfo:@{RCTDidInitializeModuleNotificationModuleKey : module, @"bridge" : [NSNull null]}]; TurboModulePerfLogger::moduleCreateSetUpEnd(moduleName, moduleId);