close

Filter

Headless Server Developer Manual / Version 2310
Table Of Contents

The PageGrid component now iterates over the rows and their containing placements, to structure the content into several PageGridPlacement components. The key parameter is required by React to have a unique identifier for rendering multiple of the same component at once.

function PageGrid(props) {
  const rows = props.rows || [];
  return (
    <>
      {rows.map((row) =>
        row.placements.map(
          (placement) =>
            placement && <PageGridPlacement key={placement.name} {...placement} />
        )
      )}
    </>
  );
}

Example 14.6. Iterating over all rows of the PageGrid


Was this article useful?

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.