Home App Docs Blog Github

Passing data to BuilderComponent

Hi

I have finally managed to get my custom components appearing in Builder and when added to a page, also appearing in my browser on my dev URL, so happy days.

Next wall for me to knock down, if possible, currently I have region/section components for Posts, Articles, Projects etc. These are used to display a list of those collections/models, currently I do an api call to get a list of all posts for example, then I pass this list to Posts region/section to consume. Is it possible to pass this data to the BuilderComponent so the Posts region/section can still consume this data?

Cheers

Peter

OK

I think I have found an answer to this, I pass the retrieved Articles/Posts/Projects etc through the BuilderComponent data prop, then access them in the region/section component using builderState.context.

Hi Peter, happy days indeed :slight_smile:

As you found out by now, passing data is definitely supported, please check the examples here for details.