Refactor ReactApplication to support ReactHostInterface

Summary:
This diff refactors ReactApplication to support ReactHostInterface, the goal is to be able to use this interface to integrate bridgeless in RN Tester app

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D46770419

fbshipit-source-id: b3e88b12aab6287396b16b277f906026a07acad6
This commit is contained in:
David Vacca
2023-06-15 22:34:36 -07:00
committed by Facebook GitHub Bot
parent 5f088a4ddf
commit 0edc2f08e1
@@ -7,8 +7,20 @@
package com.facebook.react;
import androidx.annotation.Nullable;
import com.facebook.react.interfaces.ReactHostInterface;
/** Interface that represents an instance of a React Native application */
public interface ReactApplication {
/** Get the default {@link ReactNativeHost} for this app. */
ReactNativeHost getReactNativeHost();
/**
* Get the default {@link ReactHostInterface} for this app. This method will be used by the new
* architecture of react native
*/
default @Nullable ReactHostInterface getReactHostInterface() {
return null;
}
}