Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.facebook.react.bridge.ModuleHolder
import com.facebook.react.bridge.ModuleSpec
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags
import com.facebook.react.module.model.ReactModuleInfo
import com.facebook.react.module.model.ReactModuleInfoProvider
import com.facebook.react.uimanager.ViewManager
Expand Down Expand Up @@ -65,12 +64,9 @@ public abstract class BaseReactPackage : ReactPackage {
val reactModuleInfo = entry.value

// This Iterator is used to create the NativeModule registry. The NativeModule
// registry must not have TurboModules. Therefore, if TurboModules are enabled, and
// the current NativeModule is a TurboModule, we need to skip iterating over it.
if (
ReactNativeNewArchitectureFeatureFlags.useTurboModules() &&
reactModuleInfo.isTurboModule
) {
// registry must not have TurboModules. Therefore, if the current NativeModule is
// a TurboModule, we need to skip iterating over it.
if (reactModuleInfo.isTurboModule) {
continue
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ public open class ReactDelegate {
*
* @return true if Fabric is enabled for this Activity, false otherwise.
*/
protected var isFabricEnabled: Boolean =
ReactNativeNewArchitectureFeatureFlags.enableFabricRenderer()
private set
protected val isFabricEnabled: Boolean = true

/**
* Do not use this constructor as it's not accounting for New Architecture at all. You should use
Expand Down Expand Up @@ -95,7 +93,6 @@ public open class ReactDelegate {
launchOptions: Bundle?,
fabricEnabled: Boolean,
) {
this.isFabricEnabled = fabricEnabled
this.activity = activity
this.mainComponentName = appKey
this.launchOptions = launchOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public object DefaultNewArchitectureEntryPoint {
internal fun loadWithFeatureFlags(featureFlags: ReactNativeFeatureFlagsProvider) {
ReactNativeFeatureFlags.override(featureFlags)

privateTurboModulesEnabled = featureFlags.useTurboModules()
privateTurboModulesEnabled = true
privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture()

val (isValid, errorMessage) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<794be726d31bf395558bb987d94c3205>>
* @generated SignedSource<<2d0170cf9c00d83fd40ad45d245a80af>>
*/

/**
Expand Down Expand Up @@ -109,7 +109,7 @@ public object ReactNativeFeatureFlags {
public fun enableAndroidTextMeasurementOptimizations(): Boolean = accessor.enableAndroidTextMeasurementOptimizations()

/**
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer`.
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flag: `useTurboModules`.
*/
@JvmStatic
public fun enableBridgelessArchitecture(): Boolean = accessor.enableBridgelessArchitecture()
Expand Down Expand Up @@ -174,12 +174,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableFabricLogs(): Boolean = accessor.enableFabricLogs()

/**
* Enables the use of the Fabric renderer in the whole app.
*/
@JvmStatic
public fun enableFabricRenderer(): Boolean = accessor.enableFabricRenderer()

/**
* Enables font scale changes updating layout for measurable nodes.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e91fab99f355307aac38de7a5c84e8dd>>
* @generated SignedSource<<51900f2da230f82fc5efd9a13ffd0d91>>
*/

/**
Expand Down Expand Up @@ -44,7 +44,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableExclusivePropsUpdateAndroidCache: Boolean? = null
private var enableFabricCommitBranchingCache: Boolean? = null
private var enableFabricLogsCache: Boolean? = null
private var enableFabricRendererCache: Boolean? = null
private var enableFontScaleChangesUpdatingLayoutCache: Boolean? = null
private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
Expand Down Expand Up @@ -328,15 +327,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun enableFabricRenderer(): Boolean {
var cached = enableFabricRendererCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableFabricRenderer()
enableFabricRendererCache = cached
}
return cached
}

override fun enableFontScaleChangesUpdatingLayout(): Boolean {
var cached = enableFontScaleChangesUpdatingLayoutCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9d1f725d5a1348a2b31ad4ea2242529c>>
* @generated SignedSource<<70e36afad977606eae1a41bc202d2581>>
*/

/**
Expand Down Expand Up @@ -76,8 +76,6 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun enableFabricLogs(): Boolean

@DoNotStrip @JvmStatic public external fun enableFabricRenderer(): Boolean

@DoNotStrip @JvmStatic public external fun enableFontScaleChangesUpdatingLayout(): Boolean

@DoNotStrip @JvmStatic public external fun enableIOSTextBaselineOffsetPerLine(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f63cf074bb6687c479e2f4059662ff76>>
* @generated SignedSource<<21620d1b9e050a99523d816b4dfadfb0>>
*/

/**
Expand Down Expand Up @@ -71,8 +71,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun enableFabricLogs(): Boolean = false

override fun enableFabricRenderer(): Boolean = false

override fun enableFontScaleChangesUpdatingLayout(): Boolean = true

override fun enableIOSTextBaselineOffsetPerLine(): Boolean = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<27e88ec53841585796515db0406909dd>>
* @generated SignedSource<<e0cdd65ce91fdd1c131319b6534cd28b>>
*/

/**
Expand Down Expand Up @@ -48,7 +48,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableExclusivePropsUpdateAndroidCache: Boolean? = null
private var enableFabricCommitBranchingCache: Boolean? = null
private var enableFabricLogsCache: Boolean? = null
private var enableFabricRendererCache: Boolean? = null
private var enableFontScaleChangesUpdatingLayoutCache: Boolean? = null
private var enableIOSTextBaselineOffsetPerLineCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
Expand Down Expand Up @@ -356,16 +355,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun enableFabricRenderer(): Boolean {
var cached = enableFabricRendererCache
if (cached == null) {
cached = currentProvider.enableFabricRenderer()
accessedFeatureFlags.add("enableFabricRenderer")
enableFabricRendererCache = cached
}
return cached
}

override fun enableFontScaleChangesUpdatingLayout(): Boolean {
var cached = enableFontScaleChangesUpdatingLayoutCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2c5d2f88cf7150403cbed87aeadc0239>>
* @generated SignedSource<<e1acac73151ebf19ba401ecf6f40d1ff>>
*/

/**
Expand All @@ -27,8 +27,6 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android : ReactN

override fun enableBridgelessArchitecture(): Boolean = true

override fun enableFabricRenderer(): Boolean = true

override fun enableIntersectionObserverByDefault(): Boolean = true

override fun enableSwiftUIBasedFilters(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5670b927124074a4c59b692de8599cd5>>
* @generated SignedSource<<01f259d77ea6169af891162727de3032>>
*/

/**
Expand Down Expand Up @@ -71,8 +71,6 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun enableFabricLogs(): Boolean

@DoNotStrip public fun enableFabricRenderer(): Boolean

@DoNotStrip public fun enableFontScaleChangesUpdatingLayout(): Boolean

@DoNotStrip public fun enableIOSTextBaselineOffsetPerLine(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ public object ReactNativeNewArchitectureFeatureFlags {
return ReactNativeFeatureFlags.enableBridgelessArchitecture()
}

@JvmStatic
public fun enableFabricRenderer(): Boolean {
if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) {
Assertions.assertCondition(
ReactNativeFeatureFlags.enableFabricRenderer(),
"ReactNativeFeatureFlags.enableFabricRenderer() should be set to TRUE when Strict Mode is enabled",
)
return true
}
return ReactNativeFeatureFlags.enableFabricRenderer()
}

@JvmStatic
public fun useFabricInterop(): Boolean {
if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) {
Expand All @@ -70,16 +58,4 @@ public object ReactNativeNewArchitectureFeatureFlags {
}
return ReactNativeFeatureFlags.useTurboModuleInterop()
}

@JvmStatic
public fun useTurboModules(): Boolean {
if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) {
Assertions.assertCondition(
ReactNativeFeatureFlags.useTurboModules(),
"ReactNativeFeatureFlags.useTurboModules() should be set to TRUE when Strict Mode is enabled",
)
return true
}
return ReactNativeFeatureFlags.useTurboModules()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ public open class ReactNativeNewArchitectureFeatureFlagsDefaults() :

override fun enableBridgelessArchitecture(): Boolean = true

override fun enableFabricRenderer(): Boolean = true

override fun useNativeViewConfigsInBridgelessMode(): Boolean = true

override fun useTurboModuleInterop(): Boolean = true

override fun useTurboModules(): Boolean = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,6 @@ public class ReactHostImpl(
ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture(),
"enableBridgelessArchitecture FeatureFlag must be set to start ReactNative.",
)

Assertions.assertCondition(
ReactNativeNewArchitectureFeatureFlags.useTurboModules(),
"useTurboModules FeatureFlag must be set to start ReactNative.",
)
}
if (ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE) {
Assertions.assertCondition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<52bf46b50e91dacdac8d43c4c00ea6f3>>
* @generated SignedSource<<acd0e8fa529cd8d290644d86b653b6d6>>
*/

/**
Expand Down Expand Up @@ -183,12 +183,6 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool enableFabricRenderer() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableFabricRenderer");
return method(javaProvider_);
}

bool enableFontScaleChangesUpdatingLayout() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableFontScaleChangesUpdatingLayout");
Expand Down Expand Up @@ -709,11 +703,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableFabricLogs(
return ReactNativeFeatureFlags::enableFabricLogs();
}

bool JReactNativeFeatureFlagsCxxInterop::enableFabricRenderer(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableFabricRenderer();
}

bool JReactNativeFeatureFlagsCxxInterop::enableFontScaleChangesUpdatingLayout(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableFontScaleChangesUpdatingLayout();
Expand Down Expand Up @@ -1147,9 +1136,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableFabricLogs",
JReactNativeFeatureFlagsCxxInterop::enableFabricLogs),
makeNativeMethod(
"enableFabricRenderer",
JReactNativeFeatureFlagsCxxInterop::enableFabricRenderer),
makeNativeMethod(
"enableFontScaleChangesUpdatingLayout",
JReactNativeFeatureFlagsCxxInterop::enableFontScaleChangesUpdatingLayout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f43b6cb2603f2c6dd2da415c4edc0a64>>
* @generated SignedSource<<7ed84ba324ba23702f76371d849e9019>>
*/

/**
Expand Down Expand Up @@ -102,9 +102,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableFabricLogs(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableFabricRenderer(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableFontScaleChangesUpdatingLayout(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<19a0fa951fda8419542fe2fc376c40f9>>
* @generated SignedSource<<767666503a4bd56fa337fe8c36fc8751>>
*/

/**
Expand Down Expand Up @@ -122,10 +122,6 @@ bool ReactNativeFeatureFlags::enableFabricLogs() {
return getAccessor().enableFabricLogs();
}

bool ReactNativeFeatureFlags::enableFabricRenderer() {
return getAccessor().enableFabricRenderer();
}

bool ReactNativeFeatureFlags::enableFontScaleChangesUpdatingLayout() {
return getAccessor().enableFontScaleChangesUpdatingLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f62617faffa739ee7822e44f3e5ff130>>
* @generated SignedSource<<98c0225ec1e07c289ccdc55cc73e5710>>
*/

/**
Expand Down Expand Up @@ -105,7 +105,7 @@ class ReactNativeFeatureFlags {
RN_EXPORT static bool enableAndroidTextMeasurementOptimizations();

/**
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer`.
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flag: `useTurboModules`.
*/
RN_EXPORT static bool enableBridgelessArchitecture();

Expand Down Expand Up @@ -159,11 +159,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableFabricLogs();

/**
* Enables the use of the Fabric renderer in the whole app.
*/
RN_EXPORT static bool enableFabricRenderer();

/**
* Enables font scale changes updating layout for measurable nodes.
*/
Expand Down
Loading
Loading