Invalid hook call. Hooks can only be called inside of the body of a function component #17199
-
Hi, I created a next app inside a react app folder. Because the plan to migrate next app and also move frontend code separately(currently all Rails and FE are in same directory). I moved few react components to next app. I fixed all dependency issues and run the application. I get invalid hook error when I access component which is located inside next app folder from root directory. FYI... I used same version of react and reactDOM in both root and next folders. How can I resolve this issue? "next": "9.5.3", |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
By including 2 versions of React you will see this bug. There is an issue open though which sounds similar #9022 as well as #11363 Aside from that I found quite a few other issues that might help |
Beta Was this translation helpful? Give feedback.
By including 2 versions of React you will see this bug. There is an issue open though which sounds similar #9022 as well as #11363
Aside from that I found quite a few other issues that might help