Fetching from bricks with RSC
Since v4.2, it is possible to directly fetch external data from a brick, without having to create the
getExternalData on a
This works for both bricks in server components projects using the
react-bricks/rsc library and bricks using the standard
In a brick, we can just add to the
getData function, which should be an async function, returning a promise that resolves to an object. This object will be merged to the component's props.
See the new External Content documentation.