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
- 2026 - Microsoft Office 365
- [Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
- Gamut mapping
- [Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
- [Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
- [BUG]: infinite loading of videos
Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments
github (SaaS)
2026 - Microsoft Office 365
[Ubuntu] `ubuntu-latest` label will use Ubuntu 26.04 in November 2026
Gamut mapping
[Codex Desktop] Editing and resending a queued message triggers "App-server queued follow-up no longer exists"
[Windows] ChatGPT 26.820.60940 fails with "invalid transport in mcp_servers.codex_app"; Beta 26.727.40816 works
[BUG]: infinite loading of videos
Restore GPT-5.6 Sol’s 372k Codex context window, or provide an opt-in setting
Codex Desktop for macOS repeatedly triggers `syspolicyd` / `trustd` CPU and memory runaway
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.
Comments (0)
No comments yet. Start the discussion.