Skip to content

Commit 374dfe8

Browse files
authored
build: make enableComponentPerformanceTrack dynamic for native-fb (#33560)
## Summary Make this flag dynamic, so it can be controlled internally. ## How did you test this change? Build, observe that `console.timeStamp` is only present in FB artifacts and `enableComponentPerformanceTrack` is referenced.
1 parent 2bee348 commit 374dfe8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
2626
export const enableLazyPublicInstanceInFabric = __VARIANT__;
2727
export const renameElementSymbol = __VARIANT__;
2828
export const enableFragmentRefs = __VARIANT__;
29+
export const enableComponentPerformanceTrack = __VARIANT__;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export const enableProfilerTimer = __PROFILE__;
5959
export const enableReactTestRendererWarning = false;
6060
export const enableRetryLaneExpiration = false;
6161
export const enableSchedulingProfiler = __PROFILE__;
62-
export const enableComponentPerformanceTrack = false;
6362
export const enableScopeAPI = false;
6463
export const enableSuspenseAvoidThisFallback = false;
6564
export const enableSuspenseCallback = true;
@@ -84,6 +83,8 @@ export const enableSrcObject = false;
8483
export const enableHydrationChangeEvent = true;
8584
export const enableDefaultTransitionIndicator = false;
8685
export const ownerStackLimit = 1e4;
86+
export const enableComponentPerformanceTrack: boolean =
87+
__PROFILE__ && dynamicFlags.enableComponentPerformanceTrack;
8788

8889
// Flow magic to verify the exports of this file match the original version.
8990
((((null: any): ExportsType): FeatureFlagsType): ExportsType);

0 commit comments

Comments
 (0)