[Fiber] only remove properties from singletons on release (#37112)
Commit Message
Removing attributes does not actually reset all property state on the singleton instance. It also has the side effect of wiping any 3rd party set attributes and properties that 3rd party scripts and extensions. Reimplements the singleton release to clear properties on the instance based on the last committed props for the singleton fiber. Notably there is an unfixed path with preamble contribution markers that still just clears based on attributes which covers SSR'd attributes that need to be wiped before client recovery on hydration can continue. There are gated failing tests for this as a TODO.
Commit b685b40 authored [Fiber] only remove properties from singletons on release (#37112) Removing attributes does not actually reset all property state on the singleton instance. It also has the side effect of wiping any 3rd party set attributes and properties that 3rd party scripts and extensions. Reimplements the singleton release to clear properties on the instance based on the last committed props for the singleton fiber. Notably there is an unfixed path with preamble contribution markers that still just clears based on attributes which covers SSR'd attributes that need to be wiped before client recovery on hydration can continue. There are gated failing tests for this as a TODO.
Commit Details
- Parent:
28cd4bb - Commit:
b685b40 - Files changed: 5
- Lines changed: 344 additions & 9 deletions
File Tree
packages/react-dom-bindings/src/clientpackages/react-dom/src/__tests__packages/react-reconciler/src
Diff
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | | |---|---|---|---|
| ||| 379 | 379 |
| | 380 | 380 |
| | 381 | 381 |
| | 382 | | - |
| | 383 | | - |
| | 382 | + |
| | 383 | + |
| 384 | 384 |
| | 385 | 385 |
| | 386 | 386 |
| | 387 | 387 |
| | | 388 | + |
| | | 389 | + |
| | | 390 | + |
| | | 391 | + |
| | | 392 | + |
| | | 393 | + |
| 388 | 394 |
| | 389 | 395 |
| | 390 | 396 |
| |---|---|---|---|
| ||| 1489 | 1495 |
| | 1490 | 1496 |
| | 1491 | 1497 |
| | | 1498 | + |
| | | 1499 | + |
| | | 1500 | + |
| | | 1501 | + |
| | | 1502 | + |
| | | 1503 | + |
| | | 1504 | + |
| | | 1505 | + |
| | | 1506 | + |
| | | 1507 | + |
| | | 1508 | + |
| | | 1509 | + |
| | | 1510 | + |
| | | 1511 | + |
| | | 1512 | + |
| | | 1513 | + |
| | | 1514 | + |
| | | 1515 | + |
| | | 1516 | + |
| | | 1517 | + |
| 1492 | 1518 |
| | 1493 | 1519 |
| | 1494 | 1520 |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | | |---|---|---|---|
| ||| 69 | 69 |
| | 70 | 70 |
| | 71 | 71 |
| | | 72 | + |
| | | 73 | + |
| | | 74 | + |
| 72 | 75 |
| | 73 | 76 |
| | 74 | 77 |
| | 75 | | - |
| 76 | 78 |
| | 77 | 79 |
| | 78 | 80 |
| |---|---|---|---|
| ||| 85 | 87 |
| | 86 | 88 |
| | 87 | 89 |
| | 88 | | - |
| 89 | 90 |
| | 90 | 91 |
| | 91 | 92 |
Lines changed: 40 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | | |---|---|---|---|
| ||| 77 | 77 |
| | 78 | 78 |
| | 79 | 79 |
| | | 80 | + |
| 80 | 81 |
| | 81 | 82 |
| | 82 | 83 |
| | | 84 | + |
| 83 | 85 |
| | 84 | 86 |
| | 85 | 87 |
| | 86 | 88 |
| | 87 | 89 |
| | 88 | 90 |
| | | 91 | + |
| 89 | 92 |
| | 90 | 93 |
| | 91 | 94 |
| |---|---|---|---|
| ||| 1269 | 1272 |
| | 1270 | 1273 |
| | 1271 | 1274 |
| | 1272 | | - |
| | 1275 | + |
| 1273 | 1276 |
| | 1274 | 1277 |
| | 1275 | 1278 |
| | 1276 | | - |
| | 1279 | + |
| 1277 | 1280 |
| | 1278 | 1281 |
| | 1279 | 1282 |
| | 1280 | 1283 |
| | 1281 | 1284 |
| | 1282 | 1285 |
| | 1283 | | - |
| | 1286 | + |
| 1284 | 1287 |
| | 1285 | 1288 |
| | 1286 | 1289 |
| |---|---|---|---|
| ||| 4844 | 4847 |
| | 4845 | 4848 |
| | 4846 | 4849 |
| | 4847 | | - |
| | 4850 | + |
| | 4851 | + |
| | 4852 | + |
| | 4853 | + |
| | 4854 | + |
| | 4855 | + |
| | 4856 | + |
| | 4857 | + |
| | 4858 | + |
| | 4859 | + |
| | 4860 | + |
|
Comments
No comments yet. Start the discussion.