Hi everyone,
I’m building a Shop Mini and everything is running fine except when I try to use the hook:
import { useRecommendedShops } from '@shopify/shop-minis-react';
As soon as I call this inside my component:
const { shops } = useRecommendedShops();
the Mini crashes with this error:
TypeError: Cannot destructure property 'getRecommendedShops' of 'useShopActions(...)' as it is undefined.
And in the console:
Uncaught TypeError: Cannot destructure property 'getRecommendedShops'
of 'useShopActions(...)' as it is undefined.
This is the same issue I encountered earlier when trying to use usePopularProducts().
Both errors point to the SDK trying to destructure methods that apparently don’t exist in my current runtime.
What I want to clarify
-
Is
useRecommendedShops()currently supported in the Shop Minis development environment (Android emulator +npx shop-minis dev)? -
Is this hook only available in certain channels (release / nightly / snapshot)?
-
Is this expected behavior because my dev runtime doesn’t yet expose
getRecommendedShopsthroughuseShopActions()? -
Is there any flag, configuration, or app setting required to enable these recommendation hooks?
My setup
-
Windows 11
-
Android Studio emulator (via
ainsidenpx shop-minis dev) -
Using Cloudflare tunnel for backend
-
SDK version installed:
@shopify/shop-minis-react(latest) -
Everything else in the Mini works perfectly — the crash only happens when I import & call this hook.
Temporary workaround
I’ve removed the hook and the app runs normally.
But I’d really like to use the recommended shops/products functionality if it’s available.
Any clarification from Shopify engineers or others who’ve gotten these hooks working would be very helpful.
Thank you!