diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 2c2f01c93..e29d4e059 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -82,17 +82,17 @@ using namespace facebook::react; - (void)registerSurface:(RCTFabricSurface *)surface { [_surfaceRegistry registerSurface:surface]; - [_scheduler registerRootTag:surface.rootViewTag.integerValue]; + [_scheduler registerRootTag:surface.rootTag]; [self runSurface:surface]; // FIXME: Mutation instruction MUST produce instruction for root node. - [_mountingManager.componentViewRegistry dequeueComponentViewWithName:@"Root" tag:surface.rootViewTag.integerValue]; + [_mountingManager.componentViewRegistry dequeueComponentViewWithName:@"Root" tag:surface.rootTag]; } - (void)unregisterSurface:(RCTFabricSurface *)surface { [self stopSurface:surface]; - [_scheduler unregisterRootTag:surface.rootViewTag.integerValue]; + [_scheduler unregisterRootTag:surface.rootTag]; [_surfaceRegistry unregisterSurface:surface]; } @@ -132,7 +132,7 @@ using namespace facebook::react; - (void)runSurface:(RCTFabricSurface *)surface { NSDictionary *applicationParameters = @{ - @"rootTag": surface.rootViewTag, + @"rootTag": @(surface.rootTag), @"initialProps": surface.properties, }; @@ -141,7 +141,7 @@ using namespace facebook::react; - (void)stopSurface:(RCTFabricSurface *)surface { - [_batchedBridge enqueueJSCall:@"AppRegistry" method:@"unmountApplicationComponentAtRootTag" args:@[surface.rootViewTag] completion:NULL]; + [_batchedBridge enqueueJSCall:@"AppRegistry" method:@"unmountApplicationComponentAtRootTag" args:@[@(surface.rootTag)] completion:NULL]; } #pragma mark - RCTMountingManagerDelegate