Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const aliases = new Map([
['markerEnd', 'marker-end'],
['markerMid', 'marker-mid'],
['markerStart', 'marker-start'],
['maskType', 'mask-type'],
['overlinePosition', 'overline-position'],
['overlineThickness', 'overline-thickness'],
['paintOrder', 'paint-order'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ const possibleStandardNames = {
markerwidth: 'markerWidth',
mask: 'mask',
maskcontentunits: 'maskContentUnits',
masktype: 'maskType',
maskunits: 'maskUnits',
mathematical: 'mathematical',
mode: 'mode',
Expand Down
18 changes: 6 additions & 12 deletions packages/react-reconciler/src/ReactFiberCommitWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import {
alwaysThrottleRetries,
enableCreateEventHandleAPI,
enableEffectEventMutationPhase,
enableHiddenSubtreeInsertionEffectCleanup,
enableProfilerTimer,
enableProfilerCommitHooks,
enableSuspenseCallback,
Expand Down Expand Up @@ -1663,17 +1662,12 @@ function commitDeletionEffectsOnFiber(
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent: {
if (
enableHiddenSubtreeInsertionEffectCleanup ||
!offscreenSubtreeWasHidden
) {
// TODO: Use a commitHookInsertionUnmountEffects wrapper to record timings.
commitHookEffectListUnmount(
HookInsertion,
deletedFiber,
nearestMountedAncestor,
);
}
// TODO: Use a commitHookInsertionUnmountEffects wrapper to record timings.
commitHookEffectListUnmount(
HookInsertion,
deletedFiber,
nearestMountedAncestor,
);
if (!offscreenSubtreeWasHidden) {
commitHookLayoutUnmountEffects(
deletedFiber,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3070,14 +3070,10 @@ describe('ReactHooksWithNoopRenderer', () => {
await act(() => {
root.render(<Activity mode="hidden" />);
});
assertConsoleErrorDev(
gate('enableHiddenSubtreeInsertionEffectCleanup')
? [
'useInsertionEffect must not schedule updates.\n' +
' in App (at **)',
]
: [],
);
assertConsoleErrorDev([
'useInsertionEffect must not schedule updates.\n' +
' in App (at **)',
]);

// Should not warn for regular effects after throw.
function NotInsertion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1610,9 +1610,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
'AsyncText:InnerAsync_1 render',
'Text:OuterFallback destroy insertion',
'Text:OuterFallback destroy layout',
...(gate(flags => flags.enableHiddenSubtreeInsertionEffectCleanup)
? ['Text:InnerFallback destroy insertion']
: []),
'Text:InnerFallback destroy insertion',
'Text:Outer create layout',
'AsyncText:OuterAsync_1 create layout',
'Text:Inner create layout',
Expand Down Expand Up @@ -1757,9 +1755,7 @@ describe('ReactSuspenseEffectsSemantics', () => {
assertLog([
'Text:Inside render',
'AsyncText:OutsideAsync render',
...(gate(flags => flags.enableHiddenSubtreeInsertionEffectCleanup)
? ['Text:Fallback:Inside destroy insertion']
: []),
'Text:Fallback:Inside destroy insertion',
'Text:Fallback:Fallback destroy insertion',
'Text:Fallback:Fallback destroy layout',
'Text:Fallback:Outside destroy insertion',
Expand Down Expand Up @@ -2248,9 +2244,7 @@ describe('ReactSuspenseEffectsSemantics', () => {

// Destroy layout and passive effects in the errored tree.
'App destroy layout',
...(gate(flags => flags.enableHiddenSubtreeInsertionEffectCleanup)
? ['Text:Inside destroy insertion']
: []),
'Text:Inside destroy insertion',
'Text:Fallback destroy insertion',
'Text:Fallback destroy layout',
'Text:Outside destroy insertion',
Expand Down Expand Up @@ -2511,9 +2505,7 @@ describe('ReactSuspenseEffectsSemantics', () => {

// Destroy layout and passive effects in the errored tree.
'App destroy layout',
...(gate(flags => flags.enableHiddenSubtreeInsertionEffectCleanup)
? ['Text:Inside destroy insertion']
: []),
'Text:Inside destroy insertion',
'Text:Fallback destroy insertion',
'Text:Fallback destroy layout',
'Text:Outside destroy insertion',
Expand Down
11 changes: 3 additions & 8 deletions packages/react-reconciler/src/__tests__/useEffectEvent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,14 +938,9 @@ describe('useEffectEvent', () => {
assertLog([
'Parent Insertion Create: A 3 2',
'Parent Layout Cleanup: A 3 2',
...(gate('enableHiddenSubtreeInsertionEffectCleanup')
? [
gate('enableViewTransition') &&
!gate('enableEffectEventMutationPhase')
? 'Child Insertion Destroy A 3 2 B 1 1 1'
: 'Child Insertion Destroy A 3 2 B 3 2 2',
]
: []),
gate('enableViewTransition') && !gate('enableEffectEventMutationPhase')
? 'Child Insertion Destroy A 3 2 B 1 1 1'
: 'Child Insertion Destroy A 3 2 B 3 2 2',
]);
});

Expand Down
5 changes: 0 additions & 5 deletions packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ export const enableInternalInstanceMap: boolean = false;

// const __NEXT_MAJOR__ = __EXPERIMENTAL__;

/**
* Enables a fix to run insertion effect cleanup on hidden subtrees.
*/
export const enableHiddenSubtreeInsertionEffectCleanup: boolean = true;

/**
* Removes legacy style context defined using static `contextTypes` and consumed with static `childContextTypes`.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

export const alwaysThrottleRetries = __VARIANT__;
export const enableObjectFiber = __VARIANT__;
export const enableHiddenSubtreeInsertionEffectCleanup = __VARIANT__;
export const enableEagerAlternateStateNodeCleanup = __VARIANT__;
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
export const enableFragmentRefs = __VARIANT__;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const dynamicFlags: DynamicExportsType = (dynamicFlagsUntyped: any);
export const {
alwaysThrottleRetries,
enableEffectEventMutationPhase,
enableHiddenSubtreeInsertionEffectCleanup,
enableObjectFiber,
enableEagerAlternateStateNodeCleanup,
passChildrenWhenCloningPersistedNodes,
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const enableCPUSuspense: boolean = false;
export const enableCreateEventHandleAPI: boolean = false;
export const enableMoveBefore: boolean = true;
export const enableFizzExternalRuntime: boolean = true;
export const enableHiddenSubtreeInsertionEffectCleanup: boolean = false;
export const enableInfiniteRenderLoopDetection: boolean = false;
export const enableLegacyCache: boolean = false;
export const enableLegacyFBSupport: boolean = false;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.test-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const enableCPUSuspense: boolean = false;
export const enableNoCloningMemoCache: boolean = false;
export const enableLegacyFBSupport: boolean = false;
export const enableMoveBefore: boolean = false;
export const enableHiddenSubtreeInsertionEffectCleanup: boolean = false;

export const enableRetryLaneExpiration: boolean = false;
export const retryLaneExpirationMs = 5000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const enableCreateEventHandleAPI = false;
export const enableMoveBefore = false;
export const enableFizzExternalRuntime = true;
export const enableInfiniteRenderLoopDetection = false;
export const enableHiddenSubtreeInsertionEffectCleanup = true;
export const enableLegacyCache = false;
export const enableLegacyFBSupport = false;
export const enableLegacyHidden = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const enableCPUSuspense: boolean = false;
export const enableNoCloningMemoCache: boolean = false;
export const enableLegacyFBSupport: boolean = false;
export const enableMoveBefore: boolean = false;
export const enableHiddenSubtreeInsertionEffectCleanup: boolean = true;

export const enableRetryLaneExpiration: boolean = false;
export const retryLaneExpirationMs = 5000;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.www-dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
export const alwaysThrottleRetries: boolean = __VARIANT__;
export const disableLegacyContextForFunctionComponents: boolean = __VARIANT__;
export const disableSchedulerTimeoutInWorkLoop: boolean = __VARIANT__;
export const enableHiddenSubtreeInsertionEffectCleanup: boolean = __VARIANT__;
export const enableNoCloningMemoCache: boolean = __VARIANT__;
export const enableObjectFiber: boolean = __VARIANT__;
export const enableRetryLaneExpiration: boolean = __VARIANT__;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const {
disableLegacyContextForFunctionComponents,
disableSchedulerTimeoutInWorkLoop,
enableEffectEventMutationPhase,
enableHiddenSubtreeInsertionEffectCleanup,
enableInfiniteRenderLoopDetection,
enableNoCloningMemoCache,
enableObjectFiber,
Expand Down