is there a working example of suspenseForQueryData
being used in PlasmicRootProvider
?
I’ve realized my usePlasmicQueryData
isn’t running in SSR - and having a hard time configuring this with a global layout
is there a working example of suspenseForQueryData
being used in PlasmicRootProvider
?
I’ve realized my usePlasmicQueryData
isn’t running in SSR - and having a hard time configuring this with a global layout
Are you using extractPlasmicQueryData()
? If so, it’ll automatically turn on suspense mode to do the prepass rendering https://docs.plasmic.app/learn/data-code-components/#fetching-data-from-your-code-components
in [[…catchall]]
I have
const queryCache = await extractPlasmicQueryData(
<Shopify.Provider>
<CartProvider>
<PlasmicRootProvider
loader={PLASMIC}
prefetchedData={plasmicData}
pageParams={pageMeta.params}
skipFonts
suspenseForQueryData
>
<PlasmicComponent
component={plasmicData.entryCompMetas[0]?.displayName}
/>
</PlasmicRootProvider>
</CartProvider>
</Shopify.Provider>
)
are you saying i don’t need suspenseForQueryData
?
yeah you shouldn’t need suspenseForQueryData
could you try printing out your queryCache you got from extractPlasmicQueryData() and see if it’s reasonable?
should I await that?
shouldn’t need to
ok - let me remove these suspenses and get you a queryCache
pulling up queryCache now
you’re right - it’s not in the queryCache
fyi - this component is being rendered from Layout. Though I am including the component in maybeFetchComponentData
Oh could you include Layout in the element you pass to extractPlasmicQueryData?
damn i knew i was about to learn something big
this has been plaguing me on all my projects
nope same thing
any chance you can share access to your repo with us?
yeah no prob