Is it possible to use extractPlasmicQueryData and prefetchedQueryData with the PlasmicRootProvider from the react-web package?
Have a codegen’d app running on Next.js where I would like to provide SSR at the component level. I have got it working with the PlasmicRootProvider from loader-next, but this seems to break the Studio Canvas rendering while using Code Components.
Tried to switch the loader to the ‘react-web’ one but found out two things:
• react-web doesn’t export extractPlasmicQueryData
• react-webPlasmicRootProvider doesn’t seem to care about what it receives as prefetchedQueryData, so the data from the plasmic-query never arrives
For now, you can just write your own extractPlasmicQueryData() , as shown here, so you can be unblocked - @inclined_boar is our resident expert on this!
@inclined_boar Giving this a try, curious if the prepass that is to be used is from the react-ssr-prepass package? I have got something working very similarly to the gist, but it is failing to find any queries on the prepass (cache comes out empty)
hi @working_tuna! yes, it should be react-ssr-prepass are you using nextjs with codegen? Can you share your project ID with me so I can take a look? (feel free to DM)