const [firstBar, secondBar] = arr.reduce((acc, el) => {
const [first, second] = acc;
if( something ){ first.push(<div key={el.id}>el.text</div>) }
else { second.push(<div key={el.id}>el.text</div>) }
}, [[], []]);
return (
<div>{firstBar}</div>
<div>{secondBar}</div>
);
funtion show(){
var contentNode = document.getElementById('#content');
var xhr = new XMLHttpRequest();
xhr.open('GET', 'tablo_cust.php');
xhr.send();
xhr.addEventListener('readystatechange', function(){
if( xhr.status !== 4 ) return;
if( xhr.status === 200 ) contentNode.innerHTML = xhr.responseText;
else console.log('Error', xhr.statusText);
);
}