❓ Shop Minis SDK: useRecommendedShops(), useRecommendedProducts() throws error — not supported in dev environment?

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

  1. Is useRecommendedShops() currently supported in the Shop Minis development environment (Android emulator + npx shop-minis dev)?

  2. Is this hook only available in certain channels (release / nightly / snapshot)?

  3. Is this expected behavior because my dev runtime doesn’t yet expose getRecommendedShops through useShopActions()?

  4. Is there any flag, configuration, or app setting required to enable these recommendation hooks?

My setup

  • Windows 11

  • Android Studio emulator (via a inside npx 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!

I have useRecommendedProducts in my mini and it’s working fine and I have the same env as yours, maybe you’re not logged in to Shop? Have you also tried using the AddToCart button or tried adding a product to a list using your mini using the list hooks?

This is working for me.
have you added - products:recommendations:readin the manifest file for recommendation? and shops:recommendations:read if you want to use useRecommendedShops?

@mehdi7 is correct that you need the scopes in order to use these hooks but you should be seeing an error that tells you that rather than anything about destructure.

@rohitmishra.14rm does adding the scopes fix it (requires a dev server restart)?

actually i wasnt wrapping my main.tsx Router with minisrouter, miniscontainer when i did that it worked. i already had those scopes in my manifest