Invalid Hook Call error in scripting extension

I’m getting an invalid hook call error, but I’m unsure as to why. My extension is intending to list all the values in a specific field in a dropdown to then select one to filter buy

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 for tips about how to debug and fix this problem.
    at resolveDispatcher (https://localhost:9000/__runFrame/bundle.js:79388:13)
    at Object.useContext (https://localhost:9000/__runFrame/bundle.js:79396:20)
    at useSdk (https://localhost:9000/__runFrame/bundle.js:25061:19)
    at useBase (https://localhost:9000/__runFrame/bundle.js:32768:41)
    at ./frontend/filter.tsx (https://localhost:9000/__runFrame/bundle.js:34:74)
    at webpack_require (https://localhost:9000/__runFrame/bundle.js:82174:41)
    at ./frontend/index.tsx (https://localhost:9000/__runFrame/bundle.js:130:65)
    at webpack_require (https://localhost:9000/__runFrame/bundle.js:82174:41)
    at runBlock (https://localhost:9000/__runFrame/bundle.js:82265:3)
    at r (
    at Generator._invoke (
    at a. [as next] (
    at ie (
    at i (

I appreciate your desire to solve this, but starting a new thread when you’ve already reported the issue in another thread just creates more confusion. I suggest deleting this thread (if you can) and focusing the conversation in the other one, which I’ll try to get back to as soon as I have the time to do so.

1 Like

I was able to solve the issue thankfully, but I am running into another issue which I will detail in the original thread

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.