Passing down custom content into `BuilderComponent` does not work unless `inlineContent` is enabled

What are you trying to accomplish
We have a Laravel app that renders React components. We use a pre-render and hydrate strategy using the PHP V8 runtime.

We want to pass down custom content into the BuilderComponent’s content prop. Specifically, we want to fetch asynchronous data from the Laravel app and pass that down as a prop into the React builder component so that it exists on initial page render to improve SEO.

We’ve implemented something similar to the custom react components w/ Server side rendering (SSR) and static site rendering (SSG) tutorial; however, it doesn’t work unless we enable the inlineContent prop. From the docs, it says it renders content in-line only (can't passed from the content prop) don't fetch content from our API.

Will using inlineContent produce any unexpected behaviors? Is there a different approach the Builder Team recommends?

Code stack you are integrating Builder with
React, PHP, Laravel

Hi @tommy!

Using inlineContent shouldn’t cause any unexpected behaviors and this is the correct approach. inlineContent is used to tell the BuilderComponent to not attempt to fetch anything from the API and instead just use the data already in the content property.

1 Like