Skip to content

Commit

Permalink
Mention forwardRef() in <Fn ref={...} /> errors and warnings (#14644)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Jan 21, 2019
1 parent 4bcaf39 commit 5267f8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/__tests__/ReactTestRenderer-test.internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ describe('ReactTestRenderer', () => {
ReactTestRenderer.create(<Baz />);
expect(() => ReactTestRenderer.create(<Foo />)).toWarnDev(
'Warning: Function components cannot be given refs. Attempts ' +
'to access this ref will fail.\n\nCheck the render method of `Foo`.\n' +
'to access this ref will fail. ' +
'Did you mean to use React.forwardRef()?\n\n' +
'Check the render method of `Foo`.\n' +
' in Bar (at **)\n' +
' in Foo (at **)',
);
Expand Down

0 comments on commit 5267f8d

Please sign in to comment.