Support for server components in Plasmic

Question, I saw in the codegen method in my nextjs application that all plasmic pages are client components, which means that I cannot use any react server components. Are there any plans to optimize the use of server components in plasmic? The same for the components that are generated.

Is there any news on extractPlasmicQueryData for app directory

Hi, that should work already with the app directory for initial page loads, just not on page navigations since the app directory does not support client component SSR on page navigations anymore

Do you already have other solutions for this? Or working on this?

Also plasmic-init-client is a client component, so the all the children are client components, this in the loader method

Great questions, just to tease this apart a little bit:

We are working on better support for data prefetching even on page transitions within app directory, but we don’t have a timeline on this. For the time being, the smoothest way to ensure dynamic data prefetching even on page transitions is sticking to the pages directory, at least for those specific routes handled by plasmic.

As a secondary priority, we may extend Plasmic Studio to support registering and manipulating server components, as well as generating server components from your designs in plasmic, but that is more future leaning work

Yang thanks for the tease. Would love to see both things implemented. espcially the second one, where we by default use server components and pages and only at interactivity or using other browser APIs you will convert to client components.