Deprecate the DefaultNewArchitectureEntryPoint.load(Boolean, Boolean, Boolean) (#52439)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52439

Users should not be passing true/false values for the 3 params in the `load()` method. The app template already uses the no param overload.
I'm deprecating it so it can go in 0.81.

Changelog:
[Android] [Changed] - Deprecate the DefaultNewArchitectureEntryPoint.load(Boolean, Boolean, Boolean)

Reviewed By: rubennorte

Differential Revision: D77739268

fbshipit-source-id: c901d1ed2e9623b0fa39f4e2d79f25404c284b8d
This commit is contained in:
Nicola Corti
2025-07-04 10:33:18 -07:00
committed by Facebook GitHub Bot
parent 377baa2ef6
commit efdf73983c
2 changed files with 42 additions and 1 deletions
@@ -1867,6 +1867,8 @@ public final class com/facebook/react/defaults/DefaultNewArchitectureEntryPoint
public static final fun load (Z)V
public static final fun load (ZZ)V
public static final fun load (ZZZ)V
public static synthetic fun load$default (ZILjava/lang/Object;)V
public static synthetic fun load$default (ZZILjava/lang/Object;)V
public static synthetic fun load$default (ZZZILjava/lang/Object;)V
public final fun setReleaseLevel (Lcom/facebook/react/common/ReleaseLevel;)V
}
@@ -33,8 +33,47 @@ public object DefaultNewArchitectureEntryPoint {
public var releaseLevel: ReleaseLevel = ReleaseLevel.STABLE
/**
* Loads the React Native New Architecture entry point with the default configuration.
*
* This will load the app with TurboModules, Fabric and Bridgeless by default.
*/
@JvmStatic
@JvmOverloads
public fun load() {
load(turboModulesEnabled = true, fabricEnabled = true, bridgelessEnabled = true)
}
@JvmStatic
@Deprecated(
message =
"Loading the entry point with different flags for Fabric, TurboModule and Bridgeless is deprecated." +
"Please use load() instead when loading the New Architecture.",
replaceWith = ReplaceWith("load()"))
public fun load(
turboModulesEnabled: Boolean = true,
) {
load(turboModulesEnabled, fabricEnabled = true, bridgelessEnabled = true)
}
@JvmStatic
@Deprecated(
message =
"Loading the entry point with different flags for Fabric, TurboModule and Bridgeless is deprecated." +
"Please use load() instead when loading the New Architecture.",
replaceWith = ReplaceWith("load()"))
public fun load(
turboModulesEnabled: Boolean = true,
fabricEnabled: Boolean = true,
) {
load(turboModulesEnabled, fabricEnabled, bridgelessEnabled = true)
}
@JvmStatic
@Deprecated(
message =
"Loading the entry point with different flags for Fabric, TurboModule and Bridgeless is deprecated." +
"Please use load() instead when loading the New Architecture.",
replaceWith = ReplaceWith("load()"))
public fun load(
turboModulesEnabled: Boolean = true,
fabricEnabled: Boolean = true,