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
Using the Widget throws an invalid hook call error.
There are two errors that appear in the console:
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
at resolveDispatcher (react.development.js?aef8:1476)
at useLayoutEffect (react.development.js?aef8:1523)
at Config (index-be67ac8a.js?6244:187)
at renderWithHooks (react-dom.development.js?61bb:14803)
at mountIndeterminateComponent (react-dom.development.js?61bb:17482)
at beginWork (react-dom.development.js?61bb:18596)
at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:237)
at invokeGuardedCallback (react-dom.development.js?61bb:292)
at beginWork$1 (react-dom.development.js?61bb:23203)
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
at resolveDispatcher (react.development.js?aef8:1476)
at useState (react.development.js?aef8:1507)
at ClientSuspense (index.js?506e:5)
at renderWithHooks (react-dom.development.js?61bb:14803)
at mountIndeterminateComponent (react-dom.development.js?61bb:17482)
at beginWork (react-dom.development.js?61bb:18596)
at HTMLUnknownElement.callCallback (react-dom.development.js?61bb:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js?61bb:237)
at invokeGuardedCallback (react-dom.development.js?61bb:292)
at beginWork$1 (react-dom.development.js?61bb:23203)
This occurred when integrating uploadcare into our existing React app, following step 2 here
On a hunch, I disabled code splitting by adding the plugin new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }) to our config, and that seems to have fixed the issue.
Using the Widget throws an invalid hook call error.
There are two errors that appear in the console:
This occurred when integrating uploadcare into our existing React app, following step 2 here
To reproduce, run
and include
Environment
build-info.json
:The text was updated successfully, but these errors were encountered: