can someone explain to me (as if I was 5) why it is possible to do codegen for NextJS with pages
but not for apps
?
apps
uses a special run time for react server components, and components there need to be cognizant of whether they can be used on the server or the client. Plasmic components right now make use of React contexts and so mostly need to be rendered as client components. Even so, the usual strategy for extracting the data queried by your design for SSR does not work; the technique attempts to pre-render your page and fire off any data fetching that will be done, so it can cache the fetched data. But in the react-server-component runtime, not all components can be pre-rendered, as it only supports importing server components and not client components