From ff1b950e29efc5e34fd626ef37f2366161d001f4 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Fri, 7 Sep 2018 23:38:53 -0700 Subject: [PATCH] Fabric: Proper way to stop Fabric Surfaces Summary: @public Apparently, we have to call `ReactFabric.unmountComponentAtNode(tag)` instead of `AppRegistry.unmountApplicationComponentAtRootTag(tag)`. Reviewed By: sahrens Differential Revision: D9652730 fbshipit-source-id: f56dba7dbe5421a7d939b91178db5104476fe550 --- React/Fabric/RCTSurfacePresenter.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 075ae747c..bc8ca9272 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -147,7 +147,7 @@ using namespace facebook::react; - (void)stopSurface:(RCTFabricSurface *)surface { - [_batchedBridge enqueueJSCall:@"AppRegistry" method:@"unmountApplicationComponentAtRootTag" args:@[@(surface.rootTag)] completion:NULL]; + [_batchedBridge enqueueJSCall:@"ReactFabric" method:@"unmountComponentAtNode" args:@[@(surface.rootTag)] completion:NULL]; } #pragma mark - RCTMountingManagerDelegate