@@ -709,9 +709,9 @@ describe('ReactComponentLifeCycle', () => {
709
709
) ;
710
710
} ) . toLowPriorityWarnDev (
711
711
[
712
- 'componentWillMount is deprecated ' ,
713
- 'componentWillReceiveProps is deprecated ' ,
714
- 'componentWillUpdate is deprecated ' ,
712
+ 'Using componentWillMount is not recommended ' ,
713
+ 'Using componentWillReceiveProps is not recommended ' ,
714
+ 'Using componentWillUpdate is not recommended ' ,
715
715
] ,
716
716
{ withoutStack : true } ,
717
717
) ;
@@ -748,9 +748,9 @@ describe('ReactComponentLifeCycle', () => {
748
748
) ;
749
749
} ) . toLowPriorityWarnDev (
750
750
[
751
- 'componentWillMount is deprecated ' ,
752
- 'componentWillReceiveProps is deprecated ' ,
753
- 'componentWillUpdate is deprecated ' ,
751
+ 'Using componentWillMount is not recommended ' ,
752
+ 'Using componentWillReceiveProps is not recommended ' ,
753
+ 'Using componentWillUpdate is not recommended ' ,
754
754
] ,
755
755
{ withoutStack : true } ,
756
756
) ;
@@ -815,7 +815,10 @@ describe('ReactComponentLifeCycle', () => {
815
815
{ withoutStack : true } ,
816
816
) ;
817
817
} ) . toLowPriorityWarnDev (
818
- [ 'componentWillMount is deprecated' , 'componentWillUpdate is deprecated' ] ,
818
+ [
819
+ 'Using componentWillMount is not recommended' ,
820
+ 'Using componentWillUpdate is not recommended' ,
821
+ ] ,
819
822
{ withoutStack : true } ,
820
823
) ;
821
824
@@ -863,7 +866,7 @@ describe('ReactComponentLifeCycle', () => {
863
866
'https://fb.me/react-async-component-lifecycle-hooks' ,
864
867
{ withoutStack : true } ,
865
868
) ;
866
- } ) . toLowPriorityWarnDev ( [ 'componentWillMount is deprecated ' ] , {
869
+ } ) . toLowPriorityWarnDev ( [ 'Using componentWillMount is not recommended ' ] , {
867
870
withoutStack : true ,
868
871
} ) ;
869
872
@@ -887,9 +890,10 @@ describe('ReactComponentLifeCycle', () => {
887
890
'https://fb.me/react-async-component-lifecycle-hooks' ,
888
891
{ withoutStack : true } ,
889
892
) ;
890
- } ) . toLowPriorityWarnDev ( [ 'componentWillReceiveProps is deprecated' ] , {
891
- withoutStack : true ,
892
- } ) ;
893
+ } ) . toLowPriorityWarnDev (
894
+ [ 'Using componentWillReceiveProps is not recommended' ] ,
895
+ { withoutStack : true } ,
896
+ ) ;
893
897
} ) ;
894
898
895
899
it ( 'should warn about deprecated lifecycles (cWM/cWRP/cWU) if new getSnapshotBeforeUpdate is present' , ( ) => {
@@ -921,7 +925,10 @@ describe('ReactComponentLifeCycle', () => {
921
925
{ withoutStack : true } ,
922
926
) ;
923
927
} ) . toLowPriorityWarnDev (
924
- [ 'componentWillMount is deprecated' , 'componentWillUpdate is deprecated' ] ,
928
+ [
929
+ 'Using componentWillMount is not recommended' ,
930
+ 'Using componentWillUpdate is not recommended' ,
931
+ ] ,
925
932
{ withoutStack : true } ,
926
933
) ;
927
934
@@ -967,7 +974,7 @@ describe('ReactComponentLifeCycle', () => {
967
974
'https://fb.me/react-async-component-lifecycle-hooks' ,
968
975
{ withoutStack : true } ,
969
976
) ;
970
- } ) . toLowPriorityWarnDev ( [ 'componentWillMount is deprecated ' ] , {
977
+ } ) . toLowPriorityWarnDev ( [ 'Using componentWillMount is not recommended ' ] , {
971
978
withoutStack : true ,
972
979
} ) ;
973
980
@@ -990,9 +997,12 @@ describe('ReactComponentLifeCycle', () => {
990
997
'https://fb.me/react-async-component-lifecycle-hooks' ,
991
998
{ withoutStack : true } ,
992
999
) ;
993
- } ) . toLowPriorityWarnDev ( [ 'componentWillReceiveProps is deprecated' ] , {
994
- withoutStack : true ,
995
- } ) ;
1000
+ } ) . toLowPriorityWarnDev (
1001
+ [ 'Using componentWillReceiveProps is not recommended' ] ,
1002
+ {
1003
+ withoutStack : true ,
1004
+ } ,
1005
+ ) ;
996
1006
} ) ;
997
1007
998
1008
it ( 'calls effects on module-pattern component' , function ( ) {
@@ -1130,9 +1140,9 @@ describe('ReactComponentLifeCycle', () => {
1130
1140
ReactDOM . render ( < MyComponent foo = "bar" /> , div ) ,
1131
1141
) . toLowPriorityWarnDev (
1132
1142
[
1133
- 'componentWillMount is deprecated ' ,
1134
- 'componentWillReceiveProps is deprecated ' ,
1135
- 'componentWillUpdate is deprecated ' ,
1143
+ 'Using componentWillMount is not recommended ' ,
1144
+ 'Using componentWillReceiveProps is not recommended ' ,
1145
+ 'Using componentWillUpdate is not recommended ' ,
1136
1146
] ,
1137
1147
{ withoutStack : true } ,
1138
1148
) ;
@@ -1403,17 +1413,9 @@ describe('ReactComponentLifeCycle', () => {
1403
1413
ReactDOM . render ( < MyComponent x = { 1 } /> , container ) ,
1404
1414
) . toLowPriorityWarnDev (
1405
1415
[
1406
- 'componentWillMount is deprecated and will be removed in the next major version. ' +
1407
- 'Use componentDidMount instead. As a temporary workaround, ' +
1408
- 'you can rename to UNSAFE_componentWillMount.' +
1409
- '\n\nPlease update the following components: MyComponent' ,
1410
- 'componentWillReceiveProps is deprecated and will be removed in the next major version. ' +
1411
- 'Use static getDerivedStateFromProps instead.' +
1412
- '\n\nPlease update the following components: MyComponent' ,
1413
- 'componentWillUpdate is deprecated and will be removed in the next major version. ' +
1414
- 'Use componentDidUpdate instead. As a temporary workaround, ' +
1415
- 'you can rename to UNSAFE_componentWillUpdate.' +
1416
- '\n\nPlease update the following components: MyComponent' ,
1416
+ 'Using componentWillMount is not recommended' ,
1417
+ 'Using componentWillReceiveProps is not recommended' ,
1418
+ 'Using componentWillUpdate is not recommended' ,
1417
1419
] ,
1418
1420
{ withoutStack : true } ,
1419
1421
) ;
0 commit comments