@@ -192,7 +192,9 @@ describe('ReactFunctionComponent', () => {
192192 ReactTestUtils . renderIntoDocument ( < ParentUsingStringRef /> ) ,
193193 ) . toWarnDev (
194194 '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 ' +
196198 'of `ParentUsingStringRef`.\n' +
197199 ' in FunctionComponent (at **)\n' +
198200 ' in div (at **)\n' +
@@ -228,7 +230,9 @@ describe('ReactFunctionComponent', () => {
228230 ReactTestUtils . renderIntoDocument ( < ParentUsingFunctionRef /> ) ,
229231 ) . toWarnDev (
230232 '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 ' +
232236 'of `ParentUsingFunctionRef`.\n' +
233237 ' in FunctionComponent (at **)\n' +
234238 ' in div (at **)\n' +
@@ -332,7 +336,9 @@ describe('ReactFunctionComponent', () => {
332336
333337 expect ( ( ) => ReactTestUtils . renderIntoDocument ( < Parent /> ) ) . toWarnDev (
334338 '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 ' +
336342 'of `Parent`.\n' +
337343 ' in Child (at **)\n' +
338344 ' in Parent (at **)' ,
0 commit comments