Skip to content

Commit b3d5e90

Browse files
authored
[Fizz] Include unit of threshold in rel=expect deopt error (#33476)
1 parent 280ff6f commit b3d5e90

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-dom/src/__tests__/ReactDOMFizzServerEdge-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('ReactDOMFizzServerEdge', () => {
138138
if (gate(flags => flags.enableFizzBlockingRender)) {
139139
expect(errors.length).toBe(1);
140140
expect(errors[0].message).toContain(
141-
'This rendered a large document (>512) without any Suspense boundaries around most of it.',
141+
'This rendered a large document (>512 kB) without any Suspense boundaries around most of it.',
142142
);
143143
} else {
144144
expect(errors.length).toBe(0);

packages/react-server/src/ReactFizzServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5946,7 +5946,7 @@ function flushCompletedQueues(
59465946
const error = new Error(
59475947
'This rendered a large document (>' +
59485948
maxSizeKb +
5949-
') without any Suspense ' +
5949+
' kB) without any Suspense ' +
59505950
'boundaries around most of it. That can delay initial paint longer than ' +
59515951
'necessary. To improve load performance, add a <Suspense> or <SuspenseList> ' +
59525952
'around the content you expect to be below the header or below the fold. ' +

scripts/error-codes/codes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,5 +546,5 @@
546546
"558": "Client rendering an Activity suspended it again. This is a bug in React.",
547547
"559": "Expected to find a host node. This is a bug in React.",
548548
"560": "Cannot use a startGestureTransition() with a comment node root.",
549-
"561": "This rendered a large document (>%s) without any Suspense boundaries around most of it. That can delay initial paint longer than necessary. To improve load performance, add a <Suspense> or <SuspenseList> around the content you expect to be below the header or below the fold. In the meantime, the content will deopt to paint arbitrary incomplete pieces of HTML."
549+
"561": "This rendered a large document (>%s kB) without any Suspense boundaries around most of it. That can delay initial paint longer than necessary. To improve load performance, add a <Suspense> or <SuspenseList> around the content you expect to be below the header or below the fold. In the meantime, the content will deopt to paint arbitrary incomplete pieces of HTML."
550550
}

0 commit comments

Comments
 (0)