Skip to content

Commit 33aa83a

Browse files
fabriziocuccifacebook-github-bot
authored andcommitted
Stop ReactSurface in ReactDelegate::onHostDestroy (bridgeless) (#44873)
Summary: Pull Request resolved: #44873 Changelog: [Android][Fixed] - Unmount React root when activity is destroyed on bridgless Reviewed By: javache Differential Revision: D58411605 fbshipit-source-id: ff9940efd4cf5da5887d79d99bcf3721e16d6725
1 parent b8f1b92 commit 33aa83a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ public void onHostPause() {
134134

135135
public void onHostDestroy() {
136136
if (ReactFeatureFlags.enableBridgelessArchitecture) {
137+
if (mReactSurface != null) {
138+
mReactSurface.stop();
139+
mReactSurface = null;
140+
}
137141
mReactHost.onHostDestroy(mActivity);
138142
} else {
139143
if (mReactRootView != null) {

0 commit comments

Comments
 (0)