Skip to content

Commit

Permalink
Add missing call to unmountReactApplication to documentation (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
irgendeinich authored and hramos committed Jan 31, 2018
1 parent 7ba61e9 commit 7a52916
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/integration-with-existing-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ We need set the theme of `MyReactActivity` to `Theme.AppCompat.Light.NoActionBar

> 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`:

```java
@Override
Expand Down Expand Up @@ -751,6 +751,9 @@ protected void onDestroy() {
if (mReactInstanceManager != null) {
mReactInstanceManager.onHostDestroy(this);
}
if (mReactRootView != null) {
mReactRootView.unmountReactApplication();
}
}
```

Expand Down

0 comments on commit 7a52916

Please sign in to comment.