Add protected field to decouple ReactFragment lifecycle events from ReactHost#46425
Add protected field to decouple ReactFragment lifecycle events from ReactHost#46425rozele wants to merge 3 commits into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
c3ff28e to
05314da
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
05314da to
e1de17b
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
e1de17b to
c6f5dbf
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
c6f5dbf to
32e5d0b
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
32e5d0b to
d27e944
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
d27e944 to
37f27e8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
37f27e8 to
66a3fa8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
66a3fa8 to
18b6b6c
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
18b6b6c to
c497ac7
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
c497ac7 to
67fae4e
Compare
Summary: ReactDelegate does not properly annotate the ReactRootView field as Nullable. This fixes that. ## Changelog [Android][Fixed] Use appropriate Nullable attribute for ReactRootView field in ReactDelegate Differential Revision: D62514424
Summary: It's not isomorphic for `ReactDelegate` to have a `loadApp` method to initialize a surface, but only allow unloading of a surface by calling `onHostDestroy`, which also destroys the ReactHost. This change adds an `unloadApp` method to `ReactDelegate` so it can be used in, e.g., `ReactFragment` to stop a surface without tearing down the host. Differential Revision: D62448543
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
67fae4e to
eb1679d
Compare
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
eb1679d to
9ea7932
Compare
…from ReactHost (facebook#46425) Summary: Pull Request resolved: facebook#46425 It's entirely plausible that one would want to run a ReactFragment that does not tear down the ReactHost when it is destroyed. This adds a protected constructor that can be used to disable host lifecycle events in a ReactFragment. When disabled, the `onDestroy` method of the ReactFragment simply stops the surface attached to it using `ReactDelegate.unloadApp`. ## Changelog [Android][Added] Flag in ReactFragment to allow unmounting a surface without destroying ReactHost. Differential Revision: D62449779
|
This pull request was exported from Phabricator. Differential Revision: D62449779 |
9ea7932 to
512d109
Compare
|
This pull request has been merged in bb3ec4d. |
|
This pull request was successfully merged by @rozele in bb3ec4d When will my fix make it into a release? | How to file a pick request? |
Summary:
It's entirely plausible that one would want to run a ReactFragment that does not tear down the ReactHost when it is destroyed. This adds a protected flag to disable host lifecycle events in a ReactFragment. When disabled, the
onDestroymethod of the ReactFragment simply stops the surface attached to it.Changelog
[Android][Added] Flag in ReactFragment to allow unmounting a surface without destroying ReactHost.
Differential Revision: D62449779