From 36a479cef5746ae01b8b6f622a0e1d6aa9aacda2 Mon Sep 17 00:00:00 2001 From: Joe Mun Date: Fri, 11 Sep 2026 12:38:34 -0700 Subject: [PATCH] [Discord] Drop the renderer architecture from the constants cache key The key combined the app version with the renderer architecture, the latter read from ReactNativeFeatureFlags. init() runs from whichever of Application or ReactActivity.onCreate reaches it first, so an Activity created before the host app has applied its own ReactNativeFeatureFlags override performs that read first, and React Native then refuses the override for the life of the process. The app is Fabric-only, so the architecture cannot vary within an app version, and the app version is already part of the key. --- .../com/facebook/react/uimanager/UIManagerConstantsCache.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerConstantsCache.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerConstantsCache.java index 9f44918d1607..074d57e806ae 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerConstantsCache.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerConstantsCache.java @@ -6,7 +6,6 @@ import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableNativeMap; -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags; import com.tencent.mmkv.MMKV; import org.json.JSONArray; @@ -97,8 +96,6 @@ public synchronized void init(Context appContext) { cacheVersionName = appContext.getPackageManager() .getPackageInfo(appContext.getPackageName(), 0) .versionName; - cacheVersionName += "-" + (ReactNativeFeatureFlags.enableFabricRenderer() ? - "Fabric" : "NonFabric"); } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "Failed to get app version name; continuing without caching!", e); return;