Fetching CMS data not working with codegen.

Hi all,

I am trying to shift my React codebase from Headless API to codegen.
Every page is successfully loading…but any CMS-related content or embed-css edited content is not working. This implies that neither of these modules are hooking up correctly.

I simply “plasmic sync”-ed, while keeping plasmicapp/loader-react - is there something I’m missing for CMS data to be fetched correctly?

I’m assuming I’m somehow missing several connection steps - I’ve been scouring the docs for a solution, perhaps I missed it.

Hi peter, let me know if this helps


Also, do note that code gen means you’ll need to be actively managing a lot more details like this.

Can I ask what is missing from the loader that I can collect as product feedback?

I’ll check on that when I can - I did include an embed-css plasmic package, but not sure where it connected.

We had a situation where the webpage embed took over two minutes to load during customer peak time - we therefore determined that a “local to our server” load would be best and speed up load times.

Hmm, that sounds like something is going (very) wrong there… Loader itself supports fast page speeds with static and server side pre-rendering and data fetching.

Even without server/static rendering and just client side loading, the Plasmic assets are cached on globally distributed Cloudfront nodes, so it wouldn’t explain a delay that’s multiple seconds or minutes.

How is it being integrated into the website? If I remember correctly, your team was using Vue?

Are you able to tell where the slowdown is coming from? Is there any data source that the page is fetching data from?

We are using plain React.
Most of the time, loads are fast and not a problem. Just had one instance where it took a long time which had us worried. I assumed it was during an update or something 8:24pm PST this Saturday.

Only data sources the problem page was pinging was the Plasmic page, and therefore our Plasmic CMS via the plasmic loader - the rest of our page had loaded around it no problem.

I’ll ping again tomorrow - I’m away from my work computer/code at the moment. I can give more details on integration then. It followed standard examples from the docs for Headless API implementation though!

Unfortunately I did not experience that slow-down myself, so I didn’t log data; it was my boss’s experience.

Discovered the mistake, I think.

All three methods shown in image below:

We were loading using CatchAllPage() function from the example. Then swapped to loading directly from the local copy, e.g. . Just tried PlasmicComponent method, and it appears to be loading faster than ever before. Using plasmic loader so not referencing local data at all, but it is faster.