diff --git a/React/Base/RCTBridge.m b/React/Base/RCTBridge.m index 5ae96783e49..0ff789cf44c 100644 --- a/React/Base/RCTBridge.m +++ b/React/Base/RCTBridge.m @@ -292,6 +292,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) * Any thread */ dispatch_async(dispatch_get_main_queue(), ^{ + // WARNING: Invalidation is async, so it may not finish before re-setting up the bridge, + // causing some issues. TODO: revisit this post-Fabric/TurboModule. [self invalidate]; // Reload is a special case, do not preserve launchOptions and treat reload as a fresh start self->_launchOptions = nil; diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index 31cdd75b1f5..194b06c96c9 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -357,7 +357,9 @@ struct RCTInstanceCallback : public InstanceCallback { dispatch_group_leave(prepareBridge); } onProgress:^(RCTLoadingProgress *progressData) { #if RCT_DEV && __has_include("RCTDevLoadingView.h") - RCTDevLoadingView *loadingView = [weakSelf moduleForClass:[RCTDevLoadingView class]]; + // Note: RCTDevLoadingView should have been loaded at this point, so no need to allow lazy loading. + RCTDevLoadingView *loadingView = [weakSelf moduleForName:RCTBridgeModuleNameForClass([RCTDevLoadingView class]) + lazilyLoadIfNecessary:NO]; [loadingView updateProgress:progressData]; #endif }];