Commit 3ad9c5f
committed
Simplify ReactFiberHydrationWarning in react-reconciler
Stopped printing non-hydratable nodes in the diff, simplified
the ReactFiberHydrationWarning and ReactDOMHostConfig code.
Removed ReactFiberHostConfig functions:
```
getAllChildHostInstances,
getHostInstanceDisplayStringForHydrationWarning,
getHostInstanceClosingDisplayStringForHydrationWarning,
isHydratableInstance,
```
Added ReactFiberHostConfig functions:
```
getHostInstanceDisplayName,
getHostInstanceProps,
```
Removed type HydratableInstance, it everywhere was aliased
to Instance | TextInstance, and was used as such alias,
but in the custom renderer it used an opaque type,
and this failed the typechecks because the aliasing did not happen.
Alternative solution would be to alias HydratableInstance in the
custom renderer's ReactFiberHostConfig.custom to align with other
renderers. I don't see any potential for HydratableInstance to be
something else than Instance | TextInstance, so I chose to inline
the alias.
Removed type HostInstance, not needed anymore.1 parent 81834b6 commit 3ad9c5f
File tree
9 files changed
+205
-235
lines changed- packages
- react-dom/src
- __tests__
- client
- react-native-renderer/src
- react-reconciler/src
- forks
- react-test-renderer/src
9 files changed
+205
-235
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
| |||
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | | - | |
389 | 387 | | |
390 | 388 | | |
391 | 389 | | |
| |||
455 | 453 | | |
456 | 454 | | |
457 | 455 | | |
458 | | - | |
459 | 456 | | |
460 | 457 | | |
461 | 458 | | |
| |||
999 | 996 | | |
1000 | 997 | | |
1001 | 998 | | |
1002 | | - | |
1003 | 999 | | |
1004 | 1000 | | |
1005 | 1001 | | |
| |||
1022 | 1018 | | |
1023 | 1019 | | |
1024 | 1020 | | |
1025 | | - | |
1026 | 1021 | | |
1027 | 1022 | | |
1028 | 1023 | | |
| |||
1045 | 1040 | | |
1046 | 1041 | | |
1047 | 1042 | | |
1048 | | - | |
1049 | 1043 | | |
1050 | 1044 | | |
1051 | 1045 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | | - | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
| |||
403 | 400 | | |
404 | 401 | | |
405 | 402 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
413 | 406 | | |
414 | 407 | | |
415 | 408 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
431 | 413 | | |
432 | 414 | | |
433 | 415 | | |
| |||
437 | 419 | | |
438 | 420 | | |
439 | 421 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
| 422 | + | |
480 | 423 | | |
| 424 | + | |
481 | 425 | | |
482 | 426 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
496 | 430 | | |
497 | 431 | | |
498 | 432 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
0 commit comments