mirror of
https://github.com/facebook/react.git
synced 2026-02-25 23:34:59 +00:00
Persistent renderers used the `Update` effect flag to check if a subtree needs to be cloned. In some cases, that causes extra renders, such as when a layout effect is triggered which only has an effect on the JS side, but doesn't update the host components. It's been a bit tricky to find the right places where this needs to be set and I'm not 100% sure I got all the cases even though the tests passed.
28 lines
1.1 KiB
JavaScript
28 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict
|
|
*/
|
|
|
|
// In xplat, these flags are controlled by GKs. Because most GKs have some
|
|
// population running in either mode, we should run our tests that way, too,
|
|
//
|
|
// Use __VARIANT__ to simulate a GK. The tests will be run twice: once
|
|
// with the __VARIANT__ set to `true`, and once set to `false`.
|
|
//
|
|
// TODO: __VARIANT__ isn't supported for React Native flags yet. You can set the
|
|
// flag here but it won't be set to `true` in any of our test runs. Need to
|
|
// add a test configuration for React Native.
|
|
|
|
export const alwaysThrottleRetries = __VARIANT__;
|
|
export const enableAddPropertiesFastPath = __VARIANT__;
|
|
export const enableObjectFiber = __VARIANT__;
|
|
export const enablePersistedModeClonedFlag = __VARIANT__;
|
|
export const enableShallowPropDiffing = __VARIANT__;
|
|
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
|
|
export const enableFabricCompleteRootInCommitPhase = __VARIANT__;
|
|
export const enableLazyContextPropagation = __VARIANT__;
|