Remix template: Can't get session token

I am using remix template as an embedded app. The problem I am facing is that @Shopify_77 /app-bridge-react": “^4.0.0” is not compatible with @Shopify_77 /app-bridge-utils, when I use getSessionToken it gives an error:

import { useAppBridge } from '@shopify/app-bridge-react';
import { getSessionToken } from '@shopify/app-bridge-utils';
.
.
.
useEffect(() => {
   const fetch = async () {
      const appBridge = useAppBridge();
      console.log("appBridge",appBridge);
      const sessionToken = await getSessionToken(appBridge);
    }
   fetch()
},[])
.
.

and I noticed that it is only compatible with @Shopify_77 /app-bridge-react 3.x.x

1 Like