Repository: facebook/react
Pull request: unify feature flags between fb and oss for React Native renderer

# Affected flags:

### alwaysThrottleRetries

In RN OSS changed from `true` to `false`. This is what FB build uses. This flag was a root cause for big perf regression internally.

### enableDeferRootSchedulingToMicrotask

In RN OSS build changed from `true` to `false`. This is what FB build uses.

### debugRenderPhaseSideEffectsForStrictMode

Changed from true to __DEV__ in FB and OSS build. The flag is only used in debug builds and was previously `false` in RN OSS builds

### enableUnifiedSyncLane

Changed from `__VARIANT__` to `true` in FB build. This is what OSS build uses. This flag is shipped internally. cc @tyao1 

### enableLegacyHidden

In RN FB changed from `true` to `false`.  This is what OSS uses.

### allowConcurrentByDefault

In RN FB changed from `true` to `false`. 




I ran `yarn flags --diff rn rn-fb` to get the difference between feature flags and unify them.

## Before
```
yarn run v1.22.19
$ node ./scripts/flags/flags.js --diff rn rn-fb
┌───────────────────────────────────────────────┬────────┬───────┐
│                    (index)                    │ RN OSS │ RN FB │
├───────────────────────────────────────────────┼────────┼───────┤
│ allowConcurrentByDefault                      │  '❌'  │ '✅'  │
│ debugRenderPhaseSideEffectsForStrictMode      │  '❌'  │ '✅'  │
│ disableModulePatternComponents                │  '❌'  │ '✅'  │
│ enableCPUSuspense                             │  '❌'  │ '✅'  │
│ enableCacheElement                            │  '❌'  │ '✅'  │
│ enableGetInspectorDataForInstanceInProduction │  '❌'  │ '✅'  │
│ enableLegacyHidden                            │  '❌'  │ '✅'  │
│ enableSchedulingProfiler                      │  '❌'  │ '📊'  │
│ enableUseDeferredValueInitialArg              │  '❌'  │ '✅'  │
│ enableUseMemoCacheHook                        │  '❌'  │ '✅'  │
│ enableUseRefAccessWarning                     │  '❌'  │ '🧪'  │
│ passChildrenWhenCloningPersistedNodes         │  '❌'  │ '🧪'  │
│ useMicrotasksForSchedulingInFabric            │  '❌'  │ '🧪'  │
│ alwaysThrottleRetries                         │  '✅'  │ '🧪'  │
│ enableDeferRootSchedulingToMicrotask          │  '✅'  │ '🧪'  │
│ enableUnifiedSyncLane                         │  '✅'  │ '🧪'  │
└───────────────────────────────────────────────┴────────┴───────┘
```

## After
```
yarn run v1.22.19
$ node ./scripts/flags/flags.js --diff rn rn-fb
┌───────────────────────────────────────────────┬────────┬───────┐
│                    (index)                    │ RN OSS │ RN FB │
├───────────────────────────────────────────────┼────────┼───────┤
│ alwaysThrottleRetries                         │  '❌'  │ '🧪'  │
│ disableModulePatternComponents                │  '❌'  │ '✅'  │
│ enableCPUSuspense                             │  '❌'  │ '✅'  │
│ enableCacheElement                            │  '❌'  │ '✅'  │
│ enableDeferRootSchedulingToMicrotask          │  '❌'  │ '🧪'  │
│ enableGetInspectorDataForInstanceInProduction │  '❌'  │ '✅'  │
│ enableSchedulingProfiler                      │  '❌'  │ '📊'  │
│ enableUseDeferredValueInitialArg              │  '❌'  │ '✅'  │
│ enableUseMemoCacheHook                        │  '❌'  │ '✅'  │
│ enableUseRefAccessWarning                     │  '❌'  │ '🧪'  │
│ passChildrenWhenCloningPersistedNodes         │  '❌'  │ '🧪'  │
│ useMicrotasksForSchedulingInFabric            │  '❌'  │ '🧪'  │
└───────────────────────────────────────────────┴────────┴───────┘
```

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
patch: @@ -22,7 +22,6 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';
 
 export const alwaysThrottleRetries = __VARIANT__;
 export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
-export const enableUnifiedSyncLane = __VARIANT__;
 export const enableUseRefAccessWarning = __VARIANT__;
 export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
 export const useMicrotasksForSchedulingInFabric = __VARIANT__;

filename: packages/shared/forks/ReactFeatureFlags.native-fb.js
patch: @@ -20,7 +20,6 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
 export const {
   alwaysThrottleRetries,
   enableDeferRootSchedulingToMicrotask,
-  enableUnifiedSyncLane,
   enableUseRefAccessWarning,
   passChildrenWhenCloningPersistedNodes,
   useMicrotasksForSchedulingInFabric,
@@ -44,13 +43,14 @@ export const enableFormActions = true; // Doesn't affect Native
 export const enableBinaryFlight = true;
 export const enableTaint = true;
 export const enablePostpone = false;
-export const debugRenderPhaseSideEffectsForStrictMode = true;
+export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
 export const disableJavaScriptURLs = false;
 export const disableCommentsAsDOMContainers = true;
 export const disableInputAttributeSyncing = false;
 export const disableIEWorkarounds = true;
 export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__;
 export const enableScopeAPI = false;
+export const enableUnifiedSyncLane = true;
 export const enableCreateEventHandleAPI = false;
 export const enableSuspenseCallback = false;
 export const disableLegacyContext = false;
@@ -74,9 +74,9 @@ export const transitionLaneExpirationMs = 5000;
 
 export const disableSchedulerTimeoutInWorkLoop = false;
 export const enableLazyContextPropagation = false;
-export const enableLegacyHidden = true;
+export const enableLegacyHidden = false;
 export const forceConcurrentByDefaultForTesting = false;
-export const allowConcurrentByDefault = true;
+export const allowConcurrentByDefault = false;
 export const enableCustomElementPropertySupport = false;
 
 export const consoleManagedByDevToolsDuringStrictMode = false;

filename: packages/shared/forks/ReactFeatureFlags.native-oss.js
patch: @@ -10,7 +10,7 @@
 import typeof * as FeatureFlagsType from 'shared/ReactFeatureFlags';
 import typeof * as ExportsType from './ReactFeatureFlags.native-oss';
 
-export const debugRenderPhaseSideEffectsForStrictMode = false;
+export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
 export const enableDebugTracing = false;
 export const enableAsyncDebugInfo = false;
 export const enableSchedulingProfiler = false;
@@ -74,11 +74,11 @@ export const enableFloat = true;
 export const useModernStrictMode = false;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
 export const enableFizzExternalRuntime = false;
-export const enableDeferRootSchedulingToMicrotask = true;
+export const enableDeferRootSchedulingToMicrotask = false;
 
 export const enableAsyncActions = false;
 
-export const alwaysThrottleRetries = true;
+export const alwaysThrottleRetries = false;
 
 export const useMicrotasksForSchedulingInFabric = false;
 export const passChildrenWhenCloningPersistedNodes = false;

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
patch: @@ -71,7 +71,7 @@ export const enableFloat = true;
 
 export const useModernStrictMode = false;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
-export const enableDeferRootSchedulingToMicrotask = true;
+export const enableDeferRootSchedulingToMicrotask = false;
 
 export const enableAsyncActions = true;
 

filename: scripts/flow/xplat.js
patch: @@ -10,7 +10,6 @@
 declare module 'ReactNativeInternalFeatureFlags' {
   declare export var alwaysThrottleRetries: boolean;
   declare export var enableDeferRootSchedulingToMicrotask: boolean;
-  declare export var enableUnifiedSyncLane: boolean;
   declare export var enableUseRefAccessWarning: boolean;
   declare export var passChildrenWhenCloningPersistedNodes: boolean;
   declare export var useMicrotasksForSchedulingInFabric: boolean;