mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Increase nested update limit to 100 (#31061)
We're seeing the limit hit in some tests after enabling sibling prerendering. Let's bump the limit so we can run more tests and gather more signal on the changes. When we understand the scope of the problem we can determine whether we need to change how the updates are counted in prerenders and/or fix specific areas of product code.
This commit is contained in:
@@ -1427,7 +1427,7 @@ describe('ReactLegacyUpdates', () => {
|
||||
}
|
||||
}
|
||||
|
||||
let limit = 55;
|
||||
let limit = 105;
|
||||
await expect(async () => {
|
||||
await act(() => {
|
||||
ReactDOM.render(<EventuallyTerminating ref={ref} />, container);
|
||||
|
||||
+1
-1
@@ -1542,7 +1542,7 @@ describe('ReactUpdates', () => {
|
||||
}
|
||||
}
|
||||
|
||||
let limit = 55;
|
||||
let limit = 105;
|
||||
const root = ReactDOMClient.createRoot(container);
|
||||
await expect(async () => {
|
||||
await act(() => {
|
||||
|
||||
+2
-2
@@ -613,13 +613,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 = 50;
|
||||
const NESTED_UPDATE_LIMIT = 100;
|
||||
let nestedUpdateCount: number = 0;
|
||||
let rootWithNestedUpdates: FiberRoot | null = null;
|
||||
let isFlushingPassiveEffects = false;
|
||||
let didScheduleUpdateDuringPassiveEffects = false;
|
||||
|
||||
const NESTED_PASSIVE_UPDATE_LIMIT = 50;
|
||||
const NESTED_PASSIVE_UPDATE_LIMIT = 100;
|
||||
let nestedPassiveUpdateCount: number = 0;
|
||||
let rootWithPassiveNestedUpdates: FiberRoot | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user