[POS UI] Invalid hook call. Hooks can only be called inside of the body of a function component

Hi,

I have an issue in building my POS extension. It is giving me an error.
See image below:

This is a newly created app and extension.

I commented the useExtensionApi() and the tile works.

I am thinking that the issue is coming from useExtensionApi() hook and we cannot do anything about it as it is the base of POS UI extension.

HELP!

This is the package.json of POS extension

{
  "name": "pos-ui",
  "private": true,
  "version": "1.0.0",
  "main": "dist/main.js",
  "license": "UNLICENSED",
  "dependencies": {
    "react": "^17.0.0",
    "@shopify/retail-ui-extensions-react": "1.7.0"
  },
  "devDependencies": {
    "@types/react": "^17.0.0"
  }
}

Hey, Devrex, did you find solution?

If not - here is my solution.
I had the same issue but with Post Purchase.
But I think the reason for this error is the same.

Documentation on the Shopify and npm is not the same.
I was using this example: https://www.npmjs.com/package/@shopify/post-purchase-ui-extensions-react?activeTab=readme

Render looks like this:

render("Checkout::PostPurchase::Render", (props) =>