Skip to content

Commit

Permalink
filter yoga props 1/x - add feature flag excludeYogaFromRawProps (fac…
Browse files Browse the repository at this point in the history
…ebook#39430)

Summary:

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D49162188
  • Loading branch information
Zeya Peng authored and facebook-github-bot committed Sep 14, 2023
1 parent b5d69af commit 4df3002
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,7 @@ public class ReactFeatureFlags {

/** When enabled, Fabric will avoid cloning notes to perform state progression. */
public static boolean enableClonelessStateProgression = false;

/** When enabled, rawProps in Props will not include Yoga specific props. */
public static boolean excludeYogaFromRawProps = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ void Binding::installFabricUIManager(
getFeatureFlagValue("enableDefaultAsyncBatchedPriority");
CoreFeatures::enableClonelessStateProgression =
getFeatureFlagValue("enableClonelessStateProgression");
CoreFeatures::excludeYogaFromRawProps =
getFeatureFlagValue("excludeYogaFromRawProps");

// RemoveDelete mega-op
ShadowViewMutation::PlatformSupportsRemoveDeleteTreeInstruction =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ bool CoreFeatures::disableScrollEventThrottleRequirement = false;
bool CoreFeatures::enableGranularShadowTreeStateReconciliation = false;
bool CoreFeatures::enableDefaultAsyncBatchedPriority = false;
bool CoreFeatures::enableClonelessStateProgression = false;
bool CoreFeatures::excludeYogaFromRawProps = false;

} // namespace facebook::react
3 changes: 3 additions & 0 deletions packages/react-native/ReactCommon/react/utils/CoreFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ class CoreFeatures {

// When enabled, Fabric will avoid cloning notes to perform state progression.
static bool enableClonelessStateProgression;

// When enabled, rawProps in Props will not include Yoga specific props.
static bool excludeYogaFromRawProps;
};

} // namespace facebook::react

0 comments on commit 4df3002

Please sign in to comment.