@samitouri / QOS-React-2 / commits / 9372c63116

Revert rollout state of enableCache in React Native to next major only (#28565)

## Summary We're working on enabling the use of microtasks in React Native by default when using the new architecture. To enable this we need to synchronize the RN renderers from React, but doing this causes an error because the renderers now rely on an object defined in `React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` (`ReactCurrentCache`) that's hasn't been released as a stable version yet (cache). This reverts the change done in #28519 to avoid enabling the cache API in RN until we release a new version of React in npm. ## How did you test this change? Manually built the RN renderer, copied it to the RN repository and tested e2e in RNTester.

Rubén Norte committed Mar 15, 2024 at 18:02 UTC 9372c63116fc1e855c51d93d83f5150661371ec3
1 file changed +8 -1
packages/shared/forks/ReactFeatureFlags.native-oss.js
+8 -1
@@ -10,6 +10,13 @@
10 import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
11 import typeof * as ExportsType from './ReactFeatureFlags.native-oss';
12
13 +// -----------------------------------------------------------------------------
14 +// Ready for next major.
15 +//
16 +// Alias __NEXT_MAJOR__ to false for easier skimming.
17 +// -----------------------------------------------------------------------------
18 +const __NEXT_MAJOR__ = false;
19 +
20 export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
21 export const enableDebugTracing = false;
22 export const enableAsyncDebugInfo = false;
@@ -18,7 +25,7 @@ export const enableProfilerTimer = __PROFILE__;
25 export const enableProfilerCommitHooks = __PROFILE__;
26 export const enableProfilerNestedUpdatePhase = __PROFILE__;
27 export const enableUpdaterTracking = __PROFILE__;
21 -export const enableCache = true;
28 +export const enableCache = __NEXT_MAJOR__;
29 export const enableLegacyCache = false;
30 export const enableCacheElement = true;
31 export const enableFetchInstrumentation = false;