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: