Your solution should look like this:
processItems(itemArray) {
// Create an empty array that will hold the final JSX output.
let buffer = []
buffer.push(<div>A</div>);
buffer.push(<div>B</div>);
buffer.push(<div>C</div>);
// And return the buffer for display inside the render() function
return (
<div className"container flex center">
{buffer}
</div>
);
}
JSX is not HTML and you cannot assemble the html elements in multiple steps.