Preview is not loading
Hey - I'm trying to preview stores with the app installed but it doesn't load because the shopcontext.jsx and hostcontext.jsx doesn't seem to work inside the embedded preview. Same in development as and in production. Works fine on other stores using react context providers for hooks in the templates.
Once I tried using a useFindFirst for the embeddedApp in app.jsx but then it just complained about host not being provided (in the index.jsx loading after loading app.jsx). I don't want to have to refactor the app since I like having the context providers. What can I do?


4 Replies
App is "themeflow"
useShop
is a shopify hook? the preview in the editor uses a mock shopify app bridge so anything that requires the real shopify app bridge will not workOkay, no its not a Shopify hook but a context provider that uses usefindone inside it. So it should work if all the gadget hooks are supported in this view.
Yes all gadget hooks work in the preview