From 650f32456425ccb0ac211ef7d2def45a32a40eb9 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Wed, 31 Jan 2018 21:02:42 +0000 Subject: [PATCH] Deploy website Deploy website version based on d79fc4205e1a8f19e6d243a015e8ec983da1aa1b --- docs/next/integration-with-existing-apps.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/next/integration-with-existing-apps.html b/docs/next/integration-with-existing-apps.html index 9432ca6d3b8..905739d5cef 100644 --- a/docs/next/integration-with-existing-apps.html +++ b/docs/next/integration-with-existing-apps.html @@ -571,7 +571,7 @@ AppRegistry.registerComponent('MyReactNativeApp'

A ReactInstanceManager can be shared by multiple activities and/or fragments. You will want to make your own ReactFragment or ReactActivity and have a singleton holder that holds a ReactInstanceManager. When you need the ReactInstanceManager (e.g., to hook up the ReactInstanceManager to the lifecycle of those Activities or Fragments) use the one provided by the singleton.

-

Next, we need to pass some activity lifecycle callbacks to the ReactInstanceManager:

+

Next, we need to pass some activity lifecycle callbacks to the ReactInstanceManager and ReactRootView:

@Override
 protected void onPause() {
     super.onPause();
@@ -597,6 +597,9 @@ AppRegistry.registerComponent('MyReactNativeApp'if (mReactInstanceManager != null) {
         mReactInstanceManager.onHostDestroy(this);
     }
+    if (mReactRootView != null) {
+        mReactRootView.unmountReactApplication();
+    }
 }
 

We also need to pass back button events to React Native: