mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deprecate com/facebook/react/config/ReactFeatureFlags (#42718)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42718 Deprecate com/facebook/react/config/ReactFeatureFlags, to be replaced by com.facebook.react.internal.featureflags.ReactNativeFeatureFlags changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D53199655 fbshipit-source-id: 32bdc526e377ff70e2df3c97a259066a25180231
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c7479b07ae
commit
db6c98eac1
+1
@@ -17,6 +17,7 @@ import com.facebook.react.common.build.ReactBuildConfig;
|
||||
*
|
||||
* <p>These values are safe defaults and should not require manual changes.
|
||||
*/
|
||||
@Deprecated(since = "Use com.facebook.react.internal.featureflags.ReactNativeFeatureFlags instead.")
|
||||
@DoNotStripAny
|
||||
public class ReactFeatureFlags {
|
||||
/**
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ import com.facebook.react.config.ReactFeatureFlags
|
||||
object DefaultNewArchitectureEntryPoint {
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
@Suppress("DEPRECATION")
|
||||
fun load(
|
||||
turboModulesEnabled: Boolean = true,
|
||||
fabricEnabled: Boolean = true,
|
||||
|
||||
+4
@@ -49,6 +49,7 @@ class RNTesterApplication : Application(), ReactApplication {
|
||||
name: String,
|
||||
reactContext: ReactApplicationContext
|
||||
): NativeModule? {
|
||||
@Suppress("DEPRECATION")
|
||||
if (!ReactFeatureFlags.useTurboModules) {
|
||||
return null
|
||||
}
|
||||
@@ -66,6 +67,7 @@ class RNTesterApplication : Application(), ReactApplication {
|
||||
// modules.
|
||||
override fun getReactModuleInfoProvider(): ReactModuleInfoProvider =
|
||||
ReactModuleInfoProvider {
|
||||
@Suppress("DEPRECATION")
|
||||
if (ReactFeatureFlags.useTurboModules) {
|
||||
mapOf(
|
||||
SampleTurboModule.NAME to
|
||||
@@ -77,6 +79,7 @@ class RNTesterApplication : Application(), ReactApplication {
|
||||
false, // isCxxModule
|
||||
true // isTurboModule
|
||||
),
|
||||
|
||||
SampleLegacyModule.NAME to
|
||||
ReactModuleInfo(
|
||||
SampleLegacyModule.NAME,
|
||||
@@ -86,6 +89,7 @@ class RNTesterApplication : Application(), ReactApplication {
|
||||
false, // isCxxModule
|
||||
false // isTurboModule
|
||||
))
|
||||
|
||||
} else {
|
||||
emptyMap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user