IssueRaiser

Hooks + multiple instances of React

# To people coming from search: please [read this page first](https://reactjs.org/warnings/invalid-hook-call-warning.html). It contains most common possible fixes! **Do you want to request a *feature* or report a *bug*?** Enhancement **What is the current behavior?** I had multiple instances of React by mistake. When trying to use hooks, got this error: `hooks can only be called inside the body of a function component` Which is not correct since I was using function components. Took me a while to find the real cause of the issue. **What is the expected behavior?** Show the correct error message. Maybe detect that the app has multiple instances of React and say that it may be the reason of bugs.

Posted by brunolemos on Oct 27, 2018, 12:34 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

github (SaaS)

Hooks + multiple instances of React

brunolemosOct 27, 2018, 12:34 AM

# To people coming from search: please [read this page first](https://reactjs.org/warnings/invalid-hook-call-warning.html). It contains most common possible fixes! **Do you want to request a *feature* or report a *bug*?** Enhancement **What is the current behavior?** I had multiple instances of React by mistake. When trying to use hooks, got this error: `hooks can only be called inside the body of a function component` Which is not correct since I was using function components. Took me a while to find the real cause of the issue. **What is the expected behavior?** Show the correct error message. Maybe detect that the app has multiple instances of React and say that it may be the reason of bugs.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue