You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the expected behavior?
I extracted my utils.js to a package. When I replace imports from "./utils" with a real npm package, I get an error: Hooks can only be called inside the body of a function component. (see codesandbox)
Since files are identical, I expect my external file to work the same.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16.7.0-alpha.2
Chrome Version 70.0.3538.77 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
bug maybe
What is the current behavior?
https://codesandbox.io/s/km21z2l2rv
What is the expected behavior?
I extracted my utils.js to a package. When I replace imports from "./utils" with a real npm package, I get an error:
Hooks can only be called inside the body of a function component.
(see codesandbox)Since files are identical, I expect my external file to work the same.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16.7.0-alpha.2
Chrome Version 70.0.3538.77 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: