Skip to content

Commit d7c6fb9

Browse files
tyao1AndyPengc12
authored andcommitted
Enable enableUnifiedSyncLane (facebook#27646)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> The flag has been tested internally on WWW, should be good to set to true for OSS. Added a dynamic flag for fb RN. ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> yarn test
1 parent b637c3b commit d7c6fb9

File tree

7 files changed

+7
-5
lines changed

7 files changed

+7
-5
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export const enableUseRefAccessWarning = false;
151151
// Enables time slicing for updates that aren't wrapped in startTransition.
152152
export const forceConcurrentByDefaultForTesting = false;
153153

154-
export const enableUnifiedSyncLane = __EXPERIMENTAL__;
154+
export const enableUnifiedSyncLane = true;
155155

156156
// Adds an opt-in to time slicing for updates that aren't wrapped in startTransition.
157157
export const allowConcurrentByDefault = false;

packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';
2222

2323
export const enableUseRefAccessWarning = __VARIANT__;
2424
export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
25+
export const enableUnifiedSyncLane = __VARIANT__;
2526
export const alwaysThrottleRetries = __VARIANT__;
2627
export const useMicrotasksForSchedulingInFabric = __VARIANT__;
2728
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
2020
export const {
2121
enableUseRefAccessWarning,
2222
enableDeferRootSchedulingToMicrotask,
23+
enableUnifiedSyncLane,
2324
alwaysThrottleRetries,
2425
useMicrotasksForSchedulingInFabric,
2526
passChildrenWhenCloningPersistedNodes,
@@ -72,7 +73,6 @@ export const disableSchedulerTimeoutInWorkLoop = false;
7273
export const enableLazyContextPropagation = false;
7374
export const enableLegacyHidden = true;
7475
export const forceConcurrentByDefaultForTesting = false;
75-
export const enableUnifiedSyncLane = false;
7676
export const allowConcurrentByDefault = true;
7777
export const enableCustomElementPropertySupport = false;
7878

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
5757
export const enableLazyContextPropagation = false;
5858
export const enableLegacyHidden = false;
5959
export const forceConcurrentByDefaultForTesting = false;
60-
export const enableUnifiedSyncLane = false;
60+
export const enableUnifiedSyncLane = true;
6161
export const allowConcurrentByDefault = false;
6262
export const enableCustomElementPropertySupport = false;
6363

packages/shared/forks/ReactFeatureFlags.test-renderer.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
5656
export const enableLazyContextPropagation = false;
5757
export const enableLegacyHidden = false;
5858
export const forceConcurrentByDefaultForTesting = false;
59-
export const enableUnifiedSyncLane = false;
59+
export const enableUnifiedSyncLane = true;
6060
export const allowConcurrentByDefault = true;
6161

6262
export const consoleManagedByDevToolsDuringStrictMode = false;

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
5757
export const enableLazyContextPropagation = false;
5858
export const enableLegacyHidden = false;
5959
export const forceConcurrentByDefaultForTesting = false;
60-
export const enableUnifiedSyncLane = false;
60+
export const enableUnifiedSyncLane = true;
6161
export const allowConcurrentByDefault = true;
6262
export const enableCustomElementPropertySupport = false;
6363

scripts/flow/xplat.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
declare module 'ReactNativeInternalFeatureFlags' {
1111
declare export var enableUseRefAccessWarning: boolean;
1212
declare export var enableDeferRootSchedulingToMicrotask: boolean;
13+
declare export var enableUnifiedSyncLane: boolean;
1314
declare export var alwaysThrottleRetries: boolean;
1415
declare export var useMicrotasksForSchedulingInFabric: boolean;
1516
declare export var passChildrenWhenCloningPersistedNodes: boolean;

0 commit comments

Comments
 (0)