@@ -709,9 +709,9 @@ describe('ReactComponentLifeCycle', () => {
709709 ) ;
710710 } ) . toLowPriorityWarnDev (
711711 [
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 ' ,
715715 ] ,
716716 { withoutStack : true } ,
717717 ) ;
@@ -748,9 +748,9 @@ describe('ReactComponentLifeCycle', () => {
748748 ) ;
749749 } ) . toLowPriorityWarnDev (
750750 [
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 ' ,
754754 ] ,
755755 { withoutStack : true } ,
756756 ) ;
@@ -815,7 +815,10 @@ describe('ReactComponentLifeCycle', () => {
815815 { withoutStack : true } ,
816816 ) ;
817817 } ) . toLowPriorityWarnDev (
818- [ 'componentWillMount is deprecated' , 'componentWillUpdate is deprecated' ] ,
818+ [
819+ 'Using componentWillMount is not recommended' ,
820+ 'Using componentWillUpdate is not recommended' ,
821+ ] ,
819822 { withoutStack : true } ,
820823 ) ;
821824
@@ -863,7 +866,7 @@ describe('ReactComponentLifeCycle', () => {
863866 'https://fb.me/react-async-component-lifecycle-hooks' ,
864867 { withoutStack : true } ,
865868 ) ;
866- } ) . toLowPriorityWarnDev ( [ 'componentWillMount is deprecated ' ] , {
869+ } ) . toLowPriorityWarnDev ( [ 'Using componentWillMount is not recommended ' ] , {
867870 withoutStack : true ,
868871 } ) ;
869872
@@ -887,9 +890,10 @@ describe('ReactComponentLifeCycle', () => {
887890 'https://fb.me/react-async-component-lifecycle-hooks' ,
888891 { withoutStack : true } ,
889892 ) ;
890- } ) . toLowPriorityWarnDev ( [ 'componentWillReceiveProps is deprecated' ] , {
891- withoutStack : true ,
892- } ) ;
893+ } ) . toLowPriorityWarnDev (
894+ [ 'Using componentWillReceiveProps is not recommended' ] ,
895+ { withoutStack : true } ,
896+ ) ;
893897 } ) ;
894898
895899 it ( 'should warn about deprecated lifecycles (cWM/cWRP/cWU) if new getSnapshotBeforeUpdate is present' , ( ) => {
@@ -921,7 +925,10 @@ describe('ReactComponentLifeCycle', () => {
921925 { withoutStack : true } ,
922926 ) ;
923927 } ) . toLowPriorityWarnDev (
924- [ 'componentWillMount is deprecated' , 'componentWillUpdate is deprecated' ] ,
928+ [
929+ 'Using componentWillMount is not recommended' ,
930+ 'Using componentWillUpdate is not recommended' ,
931+ ] ,
925932 { withoutStack : true } ,
926933 ) ;
927934
@@ -967,7 +974,7 @@ describe('ReactComponentLifeCycle', () => {
967974 'https://fb.me/react-async-component-lifecycle-hooks' ,
968975 { withoutStack : true } ,
969976 ) ;
970- } ) . toLowPriorityWarnDev ( [ 'componentWillMount is deprecated ' ] , {
977+ } ) . toLowPriorityWarnDev ( [ 'Using componentWillMount is not recommended ' ] , {
971978 withoutStack : true ,
972979 } ) ;
973980
@@ -990,9 +997,12 @@ describe('ReactComponentLifeCycle', () => {
990997 'https://fb.me/react-async-component-lifecycle-hooks' ,
991998 { withoutStack : true } ,
992999 ) ;
993- } ) . toLowPriorityWarnDev ( [ 'componentWillReceiveProps is deprecated' ] , {
994- withoutStack : true ,
995- } ) ;
1000+ } ) . toLowPriorityWarnDev (
1001+ [ 'Using componentWillReceiveProps is not recommended' ] ,
1002+ {
1003+ withoutStack : true ,
1004+ } ,
1005+ ) ;
9961006 } ) ;
9971007
9981008 it ( 'calls effects on module-pattern component' , function ( ) {
@@ -1130,9 +1140,9 @@ describe('ReactComponentLifeCycle', () => {
11301140 ReactDOM . render ( < MyComponent foo = "bar" /> , div ) ,
11311141 ) . toLowPriorityWarnDev (
11321142 [
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 ' ,
11361146 ] ,
11371147 { withoutStack : true } ,
11381148 ) ;
@@ -1403,17 +1413,9 @@ describe('ReactComponentLifeCycle', () => {
14031413 ReactDOM . render ( < MyComponent x = { 1 } /> , container ) ,
14041414 ) . toLowPriorityWarnDev (
14051415 [
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' ,
14171419 ] ,
14181420 { withoutStack : true } ,
14191421 ) ;
0 commit comments