Rename createSyncRoot to createBlockingRoot (#17165)
* Rename createSyncRoot to createBlockingRoot * Fix up
Dan Abramov committed
Oct 23, 2019 at 15:04 UTC
f6b8d31a76cbbcbbeb2f1d59074dfe72e0c82806
24 files changed
+154
-143
packages/react-debug-tools/src/__tests__/ReactDevToolsHooksIntegration-test.js
+1
-1
@@ -180,7 +180,7 @@ describe('React hooks DevTools integration', () => {
180
}
181
});
182
183
- it('should support overriding suspense in sync mode', () => {
183
+ it('should support overriding suspense in legacy mode', () => {
184
if (__DEV__) {
185
// Lock the first render
186
setSuspenseHandler(() => true);
packages/react-devtools-shared/src/__tests__/__snapshots__/storeStressSync-test.js.snap
+54
-54
@@ -1,6 +1,6 @@
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
3
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 1`] = `
3
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 1`] = `
4
[root]
5
▾ <Root>
6
<X>
@@ -9,7 +9,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
9
<Y>
10
`;
11
12
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 2`] = `
12
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 2`] = `
13
[root]
14
▾ <Root>
15
<X>
@@ -18,7 +18,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
18
<Y>
19
`;
20
21
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 3`] = `
21
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 3`] = `
22
[root]
23
▾ <Root>
24
<X>
@@ -29,7 +29,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
29
<Y>
30
`;
31
32
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 4`] = `
32
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 4`] = `
33
[root]
34
▾ <Root>
35
<X>
@@ -40,7 +40,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
40
<Y>
41
`;
42
43
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 5`] = `
43
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 5`] = `
44
[root]
45
▾ <Root>
46
<X>
@@ -50,7 +50,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
50
<Y>
51
`;
52
53
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 6`] = `
53
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 6`] = `
54
[root]
55
▾ <Root>
56
<X>
@@ -60,7 +60,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
60
<Y>
61
`;
62
63
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 7`] = `
63
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 7`] = `
64
[root]
65
▾ <Root>
66
<X>
@@ -70,7 +70,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
70
<Y>
71
`;
72
73
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 8`] = `
73
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 8`] = `
74
[root]
75
▾ <Root>
76
<X>
@@ -80,7 +80,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
80
<Y>
81
`;
82
83
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 9`] = `
83
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 9`] = `
84
[root]
85
▾ <Root>
86
<X>
@@ -89,7 +89,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
89
<Y>
90
`;
91
92
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 10`] = `
92
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 10`] = `
93
[root]
94
▾ <Root>
95
<X>
@@ -97,7 +97,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
97
<Y>
98
`;
99
100
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 11`] = `
100
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 11`] = `
101
[root]
102
▾ <Root>
103
<X>
@@ -106,7 +106,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
106
<Y>
107
`;
108
109
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync Mode) 12`] = `
109
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 12`] = `
110
[root]
111
▾ <Root>
112
<X>
@@ -115,7 +115,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense (Sync
115
<Y>
116
`;
117
118
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 1`] = `
118
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 1`] = `
119
[root]
120
▾ <Root>
121
<X>
@@ -126,7 +126,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
126
<Y>
127
`;
128
129
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 2`] = `
129
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 2`] = `
130
[root]
131
▾ <Root>
132
<X>
@@ -137,7 +137,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
137
<Y>
138
`;
139
140
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 3`] = `
140
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 3`] = `
141
[root]
142
▾ <Root>
143
<X>
@@ -150,7 +150,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
150
<Y>
151
`;
152
153
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 4`] = `
153
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 4`] = `
154
[root]
155
▾ <Root>
156
<X>
@@ -163,7 +163,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
163
<Y>
164
`;
165
166
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 5`] = `
166
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 5`] = `
167
[root]
168
▾ <Root>
169
<X>
@@ -175,7 +175,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
175
<Y>
176
`;
177
178
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 6`] = `
178
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 6`] = `
179
[root]
180
▾ <Root>
181
<X>
@@ -187,7 +187,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
187
<Y>
188
`;
189
190
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 7`] = `
190
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 7`] = `
191
[root]
192
▾ <Root>
193
<X>
@@ -199,7 +199,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
199
<Y>
200
`;
201
202
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 8`] = `
202
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 8`] = `
203
[root]
204
▾ <Root>
205
<X>
@@ -211,7 +211,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
211
<Y>
212
`;
213
214
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 9`] = `
214
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 9`] = `
215
[root]
216
▾ <Root>
217
<X>
@@ -222,7 +222,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
222
<Y>
223
`;
224
225
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 10`] = `
225
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 10`] = `
226
[root]
227
▾ <Root>
228
<X>
@@ -232,7 +232,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
232
<Y>
233
`;
234
235
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 11`] = `
235
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 11`] = `
236
[root]
237
▾ <Root>
238
<X>
@@ -243,7 +243,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
243
<Y>
244
`;
245
246
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 12`] = `
246
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 12`] = `
247
[root]
248
▾ <Root>
249
<X>
@@ -254,7 +254,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
254
<Y>
255
`;
256
257
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 13`] = `
257
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 13`] = `
258
[root]
259
▾ <Root>
260
<X>
@@ -263,7 +263,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
263
<Y>
264
`;
265
266
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 14`] = `
266
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 14`] = `
267
[root]
268
▾ <Root>
269
<X>
@@ -272,7 +272,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
272
<Y>
273
`;
274
275
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 15`] = `
275
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 15`] = `
276
[root]
277
▾ <Root>
278
<X>
@@ -283,7 +283,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
283
<Y>
284
`;
285
286
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 16`] = `
286
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 16`] = `
287
[root]
288
▾ <Root>
289
<X>
@@ -294,7 +294,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
294
<Y>
295
`;
296
297
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 17`] = `
297
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 17`] = `
298
[root]
299
▾ <Root>
300
<X>
@@ -304,7 +304,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
304
<Y>
305
`;
306
307
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 18`] = `
307
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 18`] = `
308
[root]
309
▾ <Root>
310
<X>
@@ -314,7 +314,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
314
<Y>
315
`;
316
317
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 19`] = `
317
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 19`] = `
318
[root]
319
▾ <Root>
320
<X>
@@ -324,7 +324,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
324
<Y>
325
`;
326
327
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 20`] = `
327
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 20`] = `
328
[root]
329
▾ <Root>
330
<X>
@@ -334,7 +334,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
334
<Y>
335
`;
336
337
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 21`] = `
337
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 21`] = `
338
[root]
339
▾ <Root>
340
<X>
@@ -343,7 +343,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
343
<Y>
344
`;
345
346
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 22`] = `
346
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 22`] = `
347
[root]
348
▾ <Root>
349
<X>
@@ -351,7 +351,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
351
<Y>
352
`;
353
354
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 23`] = `
354
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 23`] = `
355
[root]
356
▾ <Root>
357
<X>
@@ -360,7 +360,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
360
<Y>
361
`;
362
363
-exports[`StoreStress (Sync Mode) should handle a stress test for Suspense without type change (Sync Mode) 24`] = `
363
+exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 24`] = `
364
[root]
365
▾ <Root>
366
<X>
@@ -369,7 +369,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test for Suspense withou
369
<Y>
370
`;
371
372
-exports[`StoreStress (Sync Mode) should handle a stress test with different tree operations (Sync Mode): 1: abcde 1`] = `
372
+exports[`StoreStress (Legacy Mode) should handle a stress test with different tree operations (Legacy Mode): 1: abcde 1`] = `
373
[root]
374
▾ <Parent>
375
<A key="a">
@@ -379,7 +379,7 @@ exports[`StoreStress (Sync Mode) should handle a stress test with different tree
379
<E key="e">
380
`;
381
382
-exports[`StoreStress (Sync Mode) should handle a stress test with different tree operations (Sync Mode): 2: abxde 1`] = `
382
+exports[`StoreStress (Legacy Mode) should handle a stress test with different tree operations (Legacy Mode): 2: abxde 1`] = `
383
[root]
384
▾ <Parent>
385
<A key="a">
@@ -390,102 +390,102 @@ exports[`StoreStress (Sync Mode) should handle a stress test with different tree
390
<E key="e">
391
`;
392
393
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 1`] = `
393
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 1`] = `
394
[root]
395
▾ <Root>
396
<A key="a">
397
`;
398
399
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 2`] = `
399
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 2`] = `
400
[root]
401
▾ <Root>
402
<B key="b">
403
`;
404
405
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 3`] = `
405
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 3`] = `
406
[root]
407
▾ <Root>
408
<C key="c">
409
`;
410
411
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 4`] = `
411
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 4`] = `
412
[root]
413
▾ <Root>
414
<D key="d">
415
`;
416
417
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 5`] = `
417
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 5`] = `
418
[root]
419
▾ <Root>
420
<E key="e">
421
`;
422
423
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 6`] = `
423
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 6`] = `
424
[root]
425
▾ <Root>
426
<A key="a">
427
`;
428
429
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 7`] = `
429
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 7`] = `
430
[root]
431
▾ <Root>
432
<B key="b">
433
`;
434
435
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 8`] = `
435
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 8`] = `
436
[root]
437
▾ <Root>
438
<C key="c">
439
`;
440
441
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 9`] = `
441
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 9`] = `
442
[root]
443
▾ <Root>
444
<D key="d">
445
`;
446
447
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 10`] = `
447
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 10`] = `
448
[root]
449
▾ <Root>
450
<E key="e">
451
`;
452
453
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 11`] = `
453
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 11`] = `
454
[root]
455
▾ <Root>
456
<A key="a">
457
<B key="b">
458
`;
459
460
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 12`] = `
460
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 12`] = `
461
[root]
462
▾ <Root>
463
<B key="b">
464
<A key="a">
465
`;
466
467
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 13`] = `
467
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 13`] = `
468
[root]
469
▾ <Root>
470
<B key="b">
471
<C key="c">
472
`;
473
474
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 14`] = `
474
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 14`] = `
475
[root]
476
▾ <Root>
477
<C key="c">
478
<B key="b">
479
`;
480
481
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 15`] = `
481
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 15`] = `
482
[root]
483
▾ <Root>
484
<A key="a">
485
<C key="c">
486
`;
487
488
-exports[`StoreStress (Sync Mode) should handle stress test with reordering (Sync Mode) 16`] = `
488
+exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 16`] = `
489
[root]
490
▾ <Root>
491
<C key="c">
packages/react-devtools-shared/src/__tests__/storeStressSync-test.js
+5
-5
@@ -7,7 +7,7 @@
7
* @flow
8
*/
9
10
-describe('StoreStress (Sync Mode)', () => {
10
+describe('StoreStress (Legacy Mode)', () => {
11
let React;
12
let ReactDOM;
13
let act;
@@ -29,7 +29,7 @@ describe('StoreStress (Sync Mode)', () => {
29
30
// This is a stress test for the tree mount/update/unmount traversal.
31
// It renders different trees that should produce the same output.
32
- it('should handle a stress test with different tree operations (Sync Mode)', () => {
32
+ it('should handle a stress test with different tree operations (Legacy Mode)', () => {
33
let setShowX;
34
const A = () => 'a';
35
const B = () => 'b';
@@ -170,7 +170,7 @@ describe('StoreStress (Sync Mode)', () => {
170
expect(print(store)).toBe('');
171
});
172
173
- it('should handle stress test with reordering (Sync Mode)', () => {
173
+ it('should handle stress test with reordering (Legacy Mode)', () => {
174
const A = () => 'a';
175
const B = () => 'b';
176
const C = () => 'c';
@@ -270,7 +270,7 @@ describe('StoreStress (Sync Mode)', () => {
270
}
271
});
272
273
- it('should handle a stress test for Suspense (Sync Mode)', async () => {
273
+ it('should handle a stress test for Suspense (Legacy Mode)', async () => {
274
const A = () => 'a';
275
const B = () => 'b';
276
const C = () => 'c';
@@ -663,7 +663,7 @@ describe('StoreStress (Sync Mode)', () => {
663
}
664
});
665
666
- it('should handle a stress test for Suspense without type change (Sync Mode)', () => {
666
+ it('should handle a stress test for Suspense without type change (Legacy Mode)', () => {
667
const A = () => 'a';
668
const B = () => 'b';
669
const C = () => 'c';
packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.internal.js
+2
-2
@@ -575,9 +575,9 @@ describe('ReactDOMFiberAsync', () => {
575
});
576
});
577
578
- describe('createSyncRoot', () => {
578
+ describe('createBlockingRoot', () => {
579
it('updates flush without yielding in the next event', () => {
580
- const root = ReactDOM.createSyncRoot(container);
580
+ const root = ReactDOM.createBlockingRoot(container);
581
582
function Text(props) {
583
Scheduler.unstable_yieldValue(props.text);
packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js
+1
-1
@@ -344,7 +344,7 @@ describe('ReactDOMServerPartialHydration', () => {
344
}).toWarnDev(
345
'Warning: Cannot hydrate Suspense in legacy mode. Switch from ' +
346
'ReactDOM.hydrate(element, container) to ' +
347
- 'ReactDOM.createSyncRoot(container, { hydrate: true })' +
347
+ 'ReactDOM.createBlockingRoot(container, { hydrate: true })' +
348
'.render(element) or remove the Suspense components from the server ' +
349
'rendered components.' +
350
'\n in Suspense (at **)' +
packages/react-dom/src/__tests__/ReactDOMServerSuspense-test.internal.js
+1
-1
@@ -126,7 +126,7 @@ describe('ReactDOMServerSuspense', () => {
126
expect(divB.textContent).toBe('B');
127
128
ReactTestUtils.act(() => {
129
- const root = ReactDOM.createSyncRoot(parent, {hydrate: true});
129
+ const root = ReactDOM.createBlockingRoot(parent, {hydrate: true});
130
root.render(example);
131
});
132
packages/react-dom/src/__tests__/ReactTestUtilsAct-test.js
+28
-21
@@ -53,45 +53,50 @@ describe('ReactTestUtils.act()', () => {
53
);
54
}
55
56
- // and then in sync mode
56
+ // and then in legacy mode
57
58
- let syncDom = null;
59
- function renderSync(el, dom) {
60
- syncDom = dom;
58
+ let legacyDom = null;
59
+ function renderLegacy(el, dom) {
60
+ legacyDom = dom;
61
ReactDOM.render(el, dom);
62
}
63
64
- function unmountSync(dom) {
65
- syncDom = null;
64
+ function unmountLegacy(dom) {
65
+ legacyDom = null;
66
ReactDOM.unmountComponentAtNode(dom);
67
}
68
69
- function rerenderSync(el) {
70
- ReactDOM.render(el, syncDom);
69
+ function rerenderLegacy(el) {
70
+ ReactDOM.render(el, legacyDom);
71
}
72
73
- runActTests('legacy sync mode', renderSync, unmountSync, rerenderSync);
73
+ runActTests('legacy mode', renderLegacy, unmountLegacy, rerenderLegacy);
74
75
- // and then in batched mode
75
+ // and then in blocking mode
76
if (__EXPERIMENTAL__) {
77
- let batchedRoot = null;
77
+ let blockingRoot = null;
78
const renderBatched = (el, dom) => {
79
- batchedRoot = ReactDOM.createSyncRoot(dom);
80
- batchedRoot.render(el);
79
+ blockingRoot = ReactDOM.createBlockingRoot(dom);
80
+ blockingRoot.render(el);
81
};
82
83
const unmountBatched = dom => {
84
- if (batchedRoot !== null) {
85
- batchedRoot.unmount();
86
- batchedRoot = null;
84
+ if (blockingRoot !== null) {
85
+ blockingRoot.unmount();
86
+ blockingRoot = null;
87
}
88
};
89
90
const rerenderBatched = el => {
91
- batchedRoot.render(el);
91
+ blockingRoot.render(el);
92
};
93
94
- runActTests('batched mode', renderBatched, unmountBatched, rerenderBatched);
94
+ runActTests(
95
+ 'blocking mode',
96
+ renderBatched,
97
+ unmountBatched,
98
+ rerenderBatched,
99
+ );
100
}
101
102
describe('unacted effects', () => {
@@ -100,7 +105,7 @@ describe('ReactTestUtils.act()', () => {
105
return null;
106
}
107
103
- it('does not warn in legacy sync mode', () => {
108
+ it('does not warn in legacy mode', () => {
109
expect(() => {
110
ReactDOM.render(<App />, document.createElement('div'));
111
}).toWarnDev([]);
@@ -121,9 +126,11 @@ describe('ReactTestUtils.act()', () => {
126
});
127
128
if (__EXPERIMENTAL__) {
124
- it('warns in batched mode', () => {
129
+ it('warns in blocking mode', () => {
130
expect(() => {
126
- const root = ReactDOM.createSyncRoot(document.createElement('div'));
131
+ const root = ReactDOM.createBlockingRoot(
132
+ document.createElement('div'),
133
+ );
134
root.render(<App />);
135
Scheduler.unstable_flushAll();
136
}).toWarnDev([
packages/react-dom/src/__tests__/ReactUnmockedSchedulerWarning-test.internal.js
+1
-1
@@ -28,7 +28,7 @@ afterEach(() => {
28
ReactFeatureFlags.warnAboutUnmockedScheduler = false;
29
});
30
31
-it('should warn in sync mode', () => {
31
+it('should warn in legacy mode', () => {
32
expect(() => {
33
ReactDOM.render(<App />, document.createElement('div'));
34
}).toWarnDev(
packages/react-dom/src/__tests__/ReactUnmockedSchedulerWarning-test.js
+8
-4
@@ -21,7 +21,7 @@ beforeEach(() => {
21
ReactDOM = require('react-dom');
22
});
23
24
-it('does not warn when rendering in sync mode', () => {
24
+it('does not warn when rendering in legacy mode', () => {
25
expect(() => {
26
ReactDOM.render(<App />, document.createElement('div'));
27
}).toWarnDev([]);
@@ -42,9 +42,11 @@ if (__EXPERIMENTAL__) {
42
}).toWarnDev([]);
43
});
44
45
- it('should warn when rendering in batched mode', () => {
45
+ it('should warn when rendering in blocking mode', () => {
46
expect(() => {
47
- ReactDOM.createSyncRoot(document.createElement('div')).render(<App />);
47
+ ReactDOM.createBlockingRoot(document.createElement('div')).render(
48
+ <App />,
49
+ );
50
}).toWarnDev(
51
'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' +
52
'to guarantee consistent behaviour across tests and browsers.',
@@ -52,7 +54,9 @@ if (__EXPERIMENTAL__) {
54
);
55
// does not warn twice
56
expect(() => {
55
- ReactDOM.createSyncRoot(document.createElement('div')).render(<App />);
57
+ ReactDOM.createBlockingRoot(document.createElement('div')).render(
58
+ <App />,
59
+ );
60
}).toWarnDev([]);
61
});
62
}
packages/react-dom/src/__tests__/ReactUpdates-test.js
+2
-2
@@ -1099,7 +1099,7 @@ describe('ReactUpdates', () => {
1099
});
1100
1101
it(
1102
- 'in sync mode, updates in componentWillUpdate and componentDidUpdate ' +
1102
+ 'in legacy mode, updates in componentWillUpdate and componentDidUpdate ' +
1103
'should both flush in the immediately subsequent commit',
1104
() => {
1105
let ops = [];
@@ -1142,7 +1142,7 @@ describe('ReactUpdates', () => {
1142
);
1143
1144
it(
1145
- 'in sync mode, updates in componentWillUpdate and componentDidUpdate ' +
1145
+ 'in legacy mode, updates in componentWillUpdate and componentDidUpdate ' +
1146
'(on a sibling) should both flush in the immediately subsequent commit',
1147
() => {
1148
let ops = [];
packages/react-dom/src/client/ReactDOM.js
+7
-7
@@ -209,7 +209,7 @@ function createRootImpl(
209
return root;
210
}
211
212
-function ReactSyncRoot(
212
+function ReactBlockingRoot(
213
container: DOMContainer,
214
tag: RootTag,
215
options: void | RootOptions,
@@ -221,7 +221,7 @@ function ReactRoot(container: DOMContainer, options: void | RootOptions) {
221
this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
222
}
223
224
-ReactRoot.prototype.render = ReactSyncRoot.prototype.render = function(
224
+ReactRoot.prototype.render = ReactBlockingRoot.prototype.render = function(
225
children: ReactNodeList,
226
callback: ?() => mixed,
227
): void {
@@ -233,7 +233,7 @@ ReactRoot.prototype.render = ReactSyncRoot.prototype.render = function(
233
updateContainer(children, root, null, callback);
234
};
235
236
-ReactRoot.prototype.unmount = ReactSyncRoot.prototype.unmount = function(
236
+ReactRoot.prototype.unmount = ReactBlockingRoot.prototype.unmount = function(
237
callback: ?() => mixed,
238
): void {
239
const root = this._internalRoot;
@@ -334,7 +334,7 @@ function legacyCreateRootFromDOMContainer(
334
}
335
336
// Legacy roots are not batched.
337
- return new ReactSyncRoot(
337
+ return new ReactBlockingRoot(
338
container,
339
LegacyRoot,
340
shouldHydrate
@@ -636,7 +636,7 @@ function createRoot(
636
return new ReactRoot(container, options);
637
}
638
639
-function createSyncRoot(
639
+function createBlockingRoot(
640
container: DOMContainer,
641
options?: RootOptions,
642
): _ReactRoot {
@@ -645,7 +645,7 @@ function createSyncRoot(
645
'createRoot(...): Target container is not a DOM element.',
646
);
647
warnIfReactDOMContainerInDEV(container);
648
- return new ReactSyncRoot(container, BatchedRoot, options);
648
+ return new ReactBlockingRoot(container, BatchedRoot, options);
649
}
650
651
function warnIfReactDOMContainerInDEV(container) {
@@ -661,7 +661,7 @@ function warnIfReactDOMContainerInDEV(container) {
661
662
if (exposeConcurrentModeAPIs) {
663
ReactDOM.createRoot = createRoot;
664
- ReactDOM.createSyncRoot = createSyncRoot;
664
+ ReactDOM.createBlockingRoot = createBlockingRoot;
665
666
ReactDOM.unstable_discreteUpdates = discreteUpdates;
667
ReactDOM.unstable_flushDiscreteUpdates = flushDiscreteUpdates;
packages/react-noop-renderer/src/createReactNoop.js
+1
-1
@@ -944,7 +944,7 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
944
};
945
},
946
947
- createSyncRoot() {
947
+ createBlockingRoot() {
948
const container = {
949
rootID: '' + idCounter++,
950
pendingChildren: [],
packages/react-reconciler/src/ReactFiber.js
+4
-4
@@ -74,7 +74,7 @@ import {
74
ConcurrentMode,
75
ProfileMode,
76
StrictMode,
77
- BatchedMode,
77
+ BlockingMode,
78
} from './ReactTypeOfMode';
79
import {
80
REACT_FORWARD_REF_TYPE,
@@ -573,9 +573,9 @@ export function resetWorkInProgress(
573
export function createHostRootFiber(tag: RootTag): Fiber {
574
let mode;
575
if (tag === ConcurrentRoot) {
576
- mode = ConcurrentMode | BatchedMode | StrictMode;
576
+ mode = ConcurrentMode | BlockingMode | StrictMode;
577
} else if (tag === BatchedRoot) {
578
- mode = BatchedMode | StrictMode;
578
+ mode = BlockingMode | StrictMode;
579
} else {
580
mode = NoMode;
581
}
@@ -627,7 +627,7 @@ export function createFiberFromTypeAndProps(
627
);
628
case REACT_CONCURRENT_MODE_TYPE:
629
fiberTag = Mode;
630
- mode |= ConcurrentMode | BatchedMode | StrictMode;
630
+ mode |= ConcurrentMode | BlockingMode | StrictMode;
631
break;
632
case REACT_STRICT_MODE_TYPE:
633
fiberTag = Mode;
packages/react-reconciler/src/ReactFiberBeginWork.js
+14
-14
@@ -103,7 +103,7 @@ import {
103
NoMode,
104
ProfileMode,
105
StrictMode,
106
- BatchedMode,
106
+ BlockingMode,
107
} from './ReactTypeOfMode';
108
import {
109
shouldSetTextContent,
@@ -1626,8 +1626,8 @@ function updateSuspenseComponent(
1626
);
1627
primaryChildFragment.return = workInProgress;
1628
1629
- if ((workInProgress.mode & BatchedMode) === NoMode) {
1630
- // Outside of batched mode, we commit the effects from the
1629
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
1630
+ // Outside of blocking mode, we commit the effects from the
1631
// partially completed, timed-out tree, too.
1632
const progressedState: SuspenseState = workInProgress.memoizedState;
1633
const progressedPrimaryChild: Fiber | null =
@@ -1712,8 +1712,8 @@ function updateSuspenseComponent(
1712
// that we're not going to hydrate.
1713
primaryChildFragment.child = null;
1714
1715
- if ((workInProgress.mode & BatchedMode) === NoMode) {
1716
- // Outside of batched mode, we commit the effects from the
1715
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
1716
+ // Outside of blocking mode, we commit the effects from the
1717
// partially completed, timed-out tree, too.
1718
let progressedChild = (primaryChildFragment.child =
1719
workInProgress.child);
@@ -1781,8 +1781,8 @@ function updateSuspenseComponent(
1781
);
1782
primaryChildFragment.return = workInProgress;
1783
1784
- if ((workInProgress.mode & BatchedMode) === NoMode) {
1785
- // Outside of batched mode, we commit the effects from the
1784
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
1785
+ // Outside of blocking mode, we commit the effects from the
1786
// partially completed, timed-out tree, too.
1787
const progressedState: SuspenseState = workInProgress.memoizedState;
1788
const progressedPrimaryChild: Fiber | null =
@@ -1876,8 +1876,8 @@ function updateSuspenseComponent(
1876
// schedule a placement.
1877
// primaryChildFragment.effectTag |= Placement;
1878
1879
- if ((workInProgress.mode & BatchedMode) === NoMode) {
1880
- // Outside of batched mode, we commit the effects from the
1879
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
1880
+ // Outside of blocking mode, we commit the effects from the
1881
// partially completed, timed-out tree, too.
1882
const progressedState: SuspenseState = workInProgress.memoizedState;
1883
const progressedPrimaryChild: Fiber | null =
@@ -1966,13 +1966,13 @@ function mountDehydratedSuspenseComponent(
1966
): null | Fiber {
1967
// During the first pass, we'll bail out and not drill into the children.
1968
// Instead, we'll leave the content in place and try to hydrate it later.
1969
- if ((workInProgress.mode & BatchedMode) === NoMode) {
1969
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
1970
if (__DEV__) {
1971
warning(
1972
false,
1973
'Cannot hydrate Suspense in legacy mode. Switch from ' +
1974
'ReactDOM.hydrate(element, container) to ' +
1975
- 'ReactDOM.createSyncRoot(container, { hydrate: true })' +
1975
+ 'ReactDOM.createBlockingRoot(container, { hydrate: true })' +
1976
'.render(element) or remove the Suspense components from ' +
1977
'the server rendered components.',
1978
);
@@ -2019,7 +2019,7 @@ function updateDehydratedSuspenseComponent(
2019
// but after we've already committed once.
2020
warnIfHydrating();
2021
2022
- if ((workInProgress.mode & BatchedMode) === NoMode) {
2022
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
2023
return retrySuspenseComponentWithoutHydrating(
2024
current,
2025
workInProgress,
@@ -2433,8 +2433,8 @@ function updateSuspenseListComponent(
2433
}
2434
pushSuspenseContext(workInProgress, suspenseContext);
2435
2436
- if ((workInProgress.mode & BatchedMode) === NoMode) {
2437
- // Outside of batched mode, SuspenseList doesn't work so we just
2436
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
2437
+ // Outside of blocking mode, SuspenseList doesn't work so we just
2438
// use make it a noop by treating it as the default revealOrder.
2439
workInProgress.memoizedState = null;
2440
} else {
packages/react-reconciler/src/ReactFiberCompleteWork.js
+3
-3
@@ -52,7 +52,7 @@ import {
52
FundamentalComponent,
53
ScopeComponent,
54
} from 'shared/ReactWorkTags';
55
-import {NoMode, BatchedMode} from './ReactTypeOfMode';
55
+import {NoMode, BlockingMode} from './ReactTypeOfMode';
56
import {
57
Ref,
58
Update,
@@ -899,12 +899,12 @@ function completeWork(
899
}
900
901
if (nextDidTimeout && !prevDidTimeout) {
902
- // If this subtreee is running in batched mode we can suspend,
902
+ // If this subtreee is running in blocking mode we can suspend,
903
// otherwise we won't suspend.
904
// TODO: This will still suspend a synchronous tree if anything
905
// in the concurrent tree already suspended during this render.
906
// This is a known bug.
907
- if ((workInProgress.mode & BatchedMode) !== NoMode) {
907
+ if ((workInProgress.mode & BlockingMode) !== NoMode) {
908
// TODO: Move this back to throwException because this is too late
909
// if this is a large tree which is common for initial loads. We
910
// don't know if we should restart a render or not until we get
packages/react-reconciler/src/ReactFiberThrow.js
+4
-4
@@ -30,7 +30,7 @@ import {
30
ShouldCapture,
31
LifecycleEffectMask,
32
} from 'shared/ReactSideEffectTags';
33
-import {NoMode, BatchedMode} from './ReactTypeOfMode';
33
+import {NoMode, BlockingMode} from './ReactTypeOfMode';
34
import {shouldCaptureSuspense} from './ReactFiberSuspenseComponent';
35
36
import {createCapturedValue} from './ReactCapturedValue';
@@ -222,15 +222,15 @@ function throwException(
222
thenables.add(thenable);
223
}
224
225
- // If the boundary is outside of batched mode, we should *not*
225
+ // If the boundary is outside of blocking mode, we should *not*
226
// suspend the commit. Pretend as if the suspended component rendered
227
// null and keep rendering. In the commit phase, we'll schedule a
228
// subsequent synchronous update to re-render the Suspense.
229
//
230
// Note: It doesn't matter whether the component that suspended was
231
- // inside a batched mode tree. If the Suspense is outside of it, we
231
+ // inside a blocking mode tree. If the Suspense is outside of it, we
232
// should *not* suspend the commit.
233
- if ((workInProgress.mode & BatchedMode) === NoMode) {
233
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
234
workInProgress.effectTag |= DidCapture;
235
236
// We're going to commit this fiber even though it didn't complete.
packages/react-reconciler/src/ReactFiberWorkLoop.js
+4
-4
@@ -74,7 +74,7 @@ import {
74
NoMode,
75
StrictMode,
76
ProfileMode,
77
- BatchedMode,
77
+ BlockingMode,
78
ConcurrentMode,
79
} from './ReactTypeOfMode';
80
import {
@@ -313,7 +313,7 @@ export function computeExpirationForFiber(
313
suspenseConfig: null | SuspenseConfig,
314
): ExpirationTime {
315
const mode = fiber.mode;
316
- if ((mode & BatchedMode) === NoMode) {
316
+ if ((mode & BlockingMode) === NoMode) {
317
return Sync;
318
}
319
@@ -413,7 +413,7 @@ export function scheduleUpdateOnFiber(
413
// a batch. This is intentionally inside scheduleUpdateOnFiber instead of
414
// scheduleCallbackForFiber to preserve the ability to schedule a callback
415
// without immediately flushing it. We only do this for user-initiated
416
- // updates, to preserve historical behavior of sync mode.
416
+ // updates, to preserve historical behavior of legacy mode.
417
flushSyncCallbackQueue();
418
}
419
}
@@ -2801,7 +2801,7 @@ export function warnIfUnmockedScheduler(fiber: Fiber) {
2801
didWarnAboutUnmockedScheduler === false &&
2802
Scheduler.unstable_flushAllWithoutAsserting === undefined
2803
) {
2804
- if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {
2804
+ if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
2805
didWarnAboutUnmockedScheduler = true;
2806
warningWithoutStack(
2807
false,
packages/react-reconciler/src/ReactTypeOfMode.js
+2
-2
@@ -11,8 +11,8 @@ export type TypeOfMode = number;
11
12
export const NoMode = 0b0000;
13
export const StrictMode = 0b0001;
14
-// TODO: Remove BatchedMode and ConcurrentMode by reading from the root
14
+// TODO: Remove BlockingMode and ConcurrentMode by reading from the root
15
// tag instead
16
-export const BatchedMode = 0b0010;
16
+export const BlockingMode = 0b0010;
17
export const ConcurrentMode = 0b0100;
18
export const ProfileMode = 0b1000;
packages/react-reconciler/src/__tests__/ReactBatchedMode-test.internal.js
+5
-5
@@ -6,7 +6,7 @@ let ReactCache;
6
let Suspense;
7
let TextResource;
8
9
-describe('ReactBatchedMode', () => {
9
+describe('ReactBlockingMode', () => {
10
beforeEach(() => {
11
jest.resetModules();
12
ReactFeatureFlags = require('shared/ReactFeatureFlags');
@@ -50,7 +50,7 @@ describe('ReactBatchedMode', () => {
50
}
51
52
it('updates flush without yielding in the next event', () => {
53
- const root = ReactNoop.createSyncRoot();
53
+ const root = ReactNoop.createBlockingRoot();
54
55
root.render(
56
<>
@@ -78,7 +78,7 @@ describe('ReactBatchedMode', () => {
78
return <Text text="Hi" />;
79
}
80
81
- const root = ReactNoop.createSyncRoot();
81
+ const root = ReactNoop.createBlockingRoot();
82
root.render(<App />);
83
expect(root).toMatchRenderedOutput(null);
84
@@ -87,7 +87,7 @@ describe('ReactBatchedMode', () => {
87
});
88
89
it('uses proper Suspense semantics, not legacy ones', async () => {
90
- const root = ReactNoop.createSyncRoot();
90
+ const root = ReactNoop.createBlockingRoot();
91
root.render(
92
<Suspense fallback={<Text text="Loading..." />}>
93
<span>
@@ -122,7 +122,7 @@ describe('ReactBatchedMode', () => {
122
123
it('flushSync does not flush batched work', () => {
124
const {useState, forwardRef, useImperativeHandle} = React;
125
- const root = ReactNoop.createSyncRoot();
125
+ const root = ReactNoop.createBlockingRoot();
126
127
const Foo = forwardRef(({label}, ref) => {
128
const [step, setStep] = useState(0);
packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.internal.js
+1
-1
@@ -1056,7 +1056,7 @@ describe('ReactHooksWithNoopRenderer', () => {
1056
}
1057
act(() => {
1058
ReactNoop.renderLegacySyncRoot(<Counter count={0} />);
1059
- // Even in sync mode, effects are deferred until after paint
1059
+ // Even in legacy mode, effects are deferred until after paint
1060
expect(Scheduler).toFlushAndYieldThrough(['Count: (empty)']);
1061
expect(ReactNoop.getChildren()).toEqual([span('Count: (empty)')]);
1062
});
packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js
+1
-1
@@ -197,7 +197,7 @@ describe('ReactIncrementalErrorHandling', () => {
197
expect(Scheduler).toFlushAndYieldThrough([
198
'Indirection',
199
// Now that the tree is complete, and there's no remaining work, React
200
- // reverts to sync mode to retry one more time before handling the error.
200
+ // reverts to legacy mode to retry one more time before handling the error.
201
202
'ErrorBoundary (try)',
203
'Indirection',
packages/react-reconciler/src/__tests__/ReactSuspense-test.internal.js
+1
-1
@@ -970,7 +970,7 @@ describe('ReactSuspense', () => {
970
expect(root).toMatchRenderedOutput('Step: 3');
971
});
972
973
- it('does not remount the fallback while suspended children resolve in sync mode', () => {
973
+ it('does not remount the fallback while suspended children resolve in legacy mode', () => {
974
let mounts = 0;
975
class ShouldMountOnce extends React.Component {
976
componentDidMount() {
packages/react-reconciler/src/__tests__/ReactSuspenseFuzz-test.internal.js
+3
-3
@@ -177,10 +177,10 @@ describe('ReactSuspenseFuzz', () => {
177
ReactNoop.renderLegacySyncRoot(null);
178
179
resetCache();
180
- const batchedSyncRoot = ReactNoop.createSyncRoot();
181
- batchedSyncRoot.render(children);
180
+ const batchedBlockingRoot = ReactNoop.createBlockingRoot();
181
+ batchedBlockingRoot.render(children);
182
resolveAllTasks();
183
- const batchedSyncOutput = batchedSyncRoot.getChildrenAsJSX();
183
+ const batchedSyncOutput = batchedBlockingRoot.getChildrenAsJSX();
184
expect(batchedSyncOutput).toEqual(expectedOutput);
185
186
resetCache();
packages/shared/ReactFeatureFlags.js
+1
-1
@@ -69,7 +69,7 @@ export const enableScopeAPI = false;
69
export const enableJSXTransformAPI = false;
70
71
// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
72
-// Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
72
+// Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version
73
export const warnAboutUnmockedScheduler = false;
74
75
// For tests, we flush suspense fallbacks in an act scope;