Skip to content

Commit

Permalink
Revert "Increase nested update limit to 100 (#31061)"
Browse files Browse the repository at this point in the history
This reverts commit f9ebd85.
  • Loading branch information
Jack Pope committed Sep 27, 2024
1 parent 9a2896f commit 4836197
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ describe('ReactLegacyUpdates', () => {
}
}

let limit = 105;
let limit = 55;
await expect(async () => {
await act(() => {
ReactDOM.render(<EventuallyTerminating ref={ref} />, container);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/__tests__/ReactUpdates-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,7 @@ describe('ReactUpdates', () => {
}
}

let limit = 105;
let limit = 55;
const root = ReactDOMClient.createRoot(container);
await expect(async () => {
await act(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,13 +608,13 @@ let pendingPassiveEffectsRenderEndTime: number = -0; // Profiling-only
let pendingPassiveTransitions: Array<Transition> | null = null;

// Use these to prevent an infinite loop of nested updates
const NESTED_UPDATE_LIMIT = 100;
const NESTED_UPDATE_LIMIT = 50;
let nestedUpdateCount: number = 0;
let rootWithNestedUpdates: FiberRoot | null = null;
let isFlushingPassiveEffects = false;
let didScheduleUpdateDuringPassiveEffects = false;

const NESTED_PASSIVE_UPDATE_LIMIT = 100;
const NESTED_PASSIVE_UPDATE_LIMIT = 50;
let nestedPassiveUpdateCount: number = 0;
let rootWithPassiveNestedUpdates: FiberRoot | null = null;

Expand Down

0 comments on commit 4836197

Please sign in to comment.