@@ -192,7 +192,9 @@ describe('ReactFunctionComponent', () => {
192
192
ReactTestUtils . renderIntoDocument ( < ParentUsingStringRef /> ) ,
193
193
) . toWarnDev (
194
194
'Warning: Function components cannot be given refs. ' +
195
- 'Attempts to access this ref will fail.\n\nCheck the render method ' +
195
+ 'Attempts to access this ref will fail. ' +
196
+ 'Did you mean to use React.forwardRef()?\n\n' +
197
+ 'Check the render method ' +
196
198
'of `ParentUsingStringRef`.\n' +
197
199
' in FunctionComponent (at **)\n' +
198
200
' in div (at **)\n' +
@@ -228,7 +230,9 @@ describe('ReactFunctionComponent', () => {
228
230
ReactTestUtils . renderIntoDocument ( < ParentUsingFunctionRef /> ) ,
229
231
) . toWarnDev (
230
232
'Warning: Function components cannot be given refs. ' +
231
- 'Attempts to access this ref will fail.\n\nCheck the render method ' +
233
+ 'Attempts to access this ref will fail. ' +
234
+ 'Did you mean to use React.forwardRef()?\n\n' +
235
+ 'Check the render method ' +
232
236
'of `ParentUsingFunctionRef`.\n' +
233
237
' in FunctionComponent (at **)\n' +
234
238
' in div (at **)\n' +
@@ -332,7 +336,9 @@ describe('ReactFunctionComponent', () => {
332
336
333
337
expect ( ( ) => ReactTestUtils . renderIntoDocument ( < Parent /> ) ) . toWarnDev (
334
338
'Warning: Function components cannot be given refs. ' +
335
- 'Attempts to access this ref will fail.\n\nCheck the render method ' +
339
+ 'Attempts to access this ref will fail. ' +
340
+ 'Did you mean to use React.forwardRef()?\n\n' +
341
+ 'Check the render method ' +
336
342
'of `Parent`.\n' +
337
343
' in Child (at **)\n' +
338
344
' in Parent (at **)' ,
0 commit comments