Good afternoon! Yesterday I was experimenting setting up Plasmic with Shopify Hydrogen and I saw two things in the “Shopify Hydrogen” quickstart doc that might have issues. I was told to send feedback here, so I will send what I know
(I will open a thread)
Issue 1: An import in
my_page.tsx is pointing to
../lib/plasmic-helpers.client , but that file seems to be in
Issue 2: The example code
src/routes.mypage.tsx gave me errors when I tried it. After investigating, I believe the issue is that it passes a string to
usePlasmicData, but that function expects an array
string. So in practice, that hook tries to split
[ 'H', 'o', 'm', 'e' ] in this line:
const plasmicData = await PLASMIC.maybeFetchComponentData(...components);
causing the whole hook to return
null and make the component fail with this error:
TypeError: Cannot destructure property 'plasmicData'
I hope this feedback helps other people facing the same errors that I encountered yesterday.
(Note: I already resolved things on my end, this is just some hopefully useful feedback )