Skip to content

Commit

Permalink
Tweak invalid Hook warning and error (#14747)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Feb 1, 2019
1 parent f50d8fc commit a263457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ReactShallowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ class ReactShallowRenderer {
_validateCurrentlyRenderingComponent() {
invariant(
this._currentlyRenderingComponent !== null,
'Hooks can only be called inside the body of a function component.',
'Hooks can only be called inside the body of a function component. ' +
'(https://fb.me/react-invalid-hook-call)',
);
}

Expand Down

0 comments on commit a263457

Please sign in to comment.