React Host
A ReactHost is an object that manages a single ReactInstance. A ReactHost can be constructed without initializing the ReactInstance, and it will continue to exist after the instance is destroyed.
The implementation of this interface should be Thread Safe
Inheritors
Properties
The current ReactContext associated with ReactInstance. It could be nullable if ReactInstance hasn't been created.
DevSupportManager used by this ReactHost
The current LifecycleState for React Host
Routes memory pressure events to interested components
ReactQueueConfiguration for caller to post jobs in React Native threads
Functions
Add a listener to be notified of ReactInstance events.
To be called to create and setup an ReactSurface.
Permanently destroys the ReactHost, including the ReactInstance (if any). The application MUST NOT call any further methods on an invalidated ReactHost.
To be called when back button is pressed
To be called when the host activity is destroyed.
To be called when the host activity is about to go into the background as the result of user choice.
To be called when the host activity is paused.
To be called when the host activity is resumed.
Entrypoint to reload the ReactInstance. If the ReactInstance is destroying, will wait until destroy is finished, before reloading.
Remove a listener previously added with addReactInstanceEventListener.
This function can be used to initialize the ReactInstance in a background thread before a surface needs to be rendered. It is not necessary to call this function; startSurface() will initialize the ReactInstance if it hasn't been preloaded.