Commit b4d0e73
committed
unify deprecated/unsafe lifecycle warnings, pass tests
- redoes facebook#15431 from scratch, taking on the feedback there
- unifies the messaging between "deprecated" and UNSAFE_ lifecycle messages. It reorganizes ReactStrictModeWarnings.js to capture and flush all the lifecycle warnings in one procedure each.
- matches the warning from ReactPartialRenderer to match the above change
- passes all the tests
- this also turns on `warnAboutDeprecatedLifecycles` for the test renderer. I think we missed doing so it previously. In a future PR, I'll remove the feature flag altogether.
- this DOES NOT do the same treatment for context warnings, I'll do that in another PR too1 parent 8533c0a commit b4d0e73
File tree
15 files changed
+347
-393
lines changed- packages
- react-dom/src
- __tests__
- server
- react-reconciler/src
- __tests__
- react/src/__tests__
15 files changed
+347
-393
lines changedLines changed: 34 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
713 | | - | |
714 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
751 | | - | |
752 | | - | |
753 | | - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
819 | 822 | | |
820 | 823 | | |
821 | 824 | | |
| |||
863 | 866 | | |
864 | 867 | | |
865 | 868 | | |
866 | | - | |
| 869 | + | |
867 | 870 | | |
868 | 871 | | |
869 | 872 | | |
| |||
887 | 890 | | |
888 | 891 | | |
889 | 892 | | |
890 | | - | |
891 | | - | |
892 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
893 | 899 | | |
894 | 900 | | |
895 | 901 | | |
| |||
921 | 927 | | |
922 | 928 | | |
923 | 929 | | |
924 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
925 | 934 | | |
926 | 935 | | |
927 | 936 | | |
| |||
967 | 976 | | |
968 | 977 | | |
969 | 978 | | |
970 | | - | |
| 979 | + | |
971 | 980 | | |
972 | 981 | | |
973 | 982 | | |
| |||
990 | 999 | | |
991 | 1000 | | |
992 | 1001 | | |
993 | | - | |
994 | | - | |
995 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
996 | 1008 | | |
997 | 1009 | | |
998 | 1010 | | |
| |||
1130 | 1142 | | |
1131 | 1143 | | |
1132 | 1144 | | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1136 | 1148 | | |
1137 | 1149 | | |
1138 | 1150 | | |
| |||
1403 | 1415 | | |
1404 | 1416 | | |
1405 | 1417 | | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
1417 | 1421 | | |
1418 | 1422 | | |
1419 | 1423 | | |
| |||
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
| |||
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
310 | 307 | | |
311 | 308 | | |
312 | 309 | | |
| |||
Lines changed: 7 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
379 | 375 | | |
380 | 376 | | |
381 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
582 | 581 | | |
583 | 582 | | |
584 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | 809 | | |
815 | 810 | | |
816 | 811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2247 | 2247 | | |
2248 | 2248 | | |
2249 | 2249 | | |
2250 | | - | |
2251 | 2250 | | |
2252 | 2251 | | |
2253 | 2252 | | |
| |||
0 commit comments