Это JSON:
[{id: 1, category1: "english", category2: "bulgarian",…},…]
0: {id: 1, category1: "engli sh", category2: "bulgarian",…} категория: [{id: 1 , значение1: "таблица", значение2: "маса", date_publi sh: "2020-07-19T15: 07: 15.423703Z", категория: 1},…] category1: "engli sh" category2: "болгарский "id: 1 user: 1
App. js
return (
<div className="App">
<header className="App-header">
<h1>Flip Cards</h1>
</header>
<div className="leyout">
<AllElements
pear={pear}
/>
</div>
</div>
);}
export default App;
AllElements. js
import React from 'react';
function AllEllemnts(props){
return (
<div className="AllElemts">
{ props.pear && props.pear.map((pear) => {
return (
<div key={pear.id} className="Allelements">
<h2>{pear.category1}-{pear.category2}</h2>
<p>{pear.category.value1}</p>
</div>
)
})}
</div>
)
}
export default AllEllemnts;