[ReactNative] Fix dev menu customization when JS fails to load

This commit is contained in:
Alex Kotliarskyi 2015-06-30 17:08:28 -07:00
parent e3225f3403
commit d7ddff7554
3 changed files with 9 additions and 0 deletions

View File

@ -219,6 +219,9 @@ RCT_NOT_IMPLEMENTED(-initWithBundleURL:(__unused NSURL *)bundleURL
[_frameUpdateObservers addObject:moduleData];
}
}
[[NSNotificationCenter defaultCenter] postNotificationName:RCTDidCreateNativeModules
object:self];
}
- (void)initJS

View File

@ -33,6 +33,11 @@ RCT_EXTERN NSString *const RCTJavaScriptDidLoadNotification;
*/
RCT_EXTERN NSString *const RCTJavaScriptDidFailToLoadNotification;
/**
* This notification fires when the bridge created all registered native modules
*/
RCT_EXTERN NSString *const RCTDidCreateNativeModules;
/**
* This block can be used to instantiate modules that require additional
* init parameters, or additional configuration prior to being used.

View File

@ -20,6 +20,7 @@
NSString *const RCTReloadNotification = @"RCTReloadNotification";
NSString *const RCTJavaScriptDidLoadNotification = @"RCTJavaScriptDidLoadNotification";
NSString *const RCTJavaScriptDidFailToLoadNotification = @"RCTJavaScriptDidFailToLoadNotification";
NSString *const RCTDidCreateNativeModules = @"RCTDidCreateNativeModules";
@class RCTBatchedBridge;