how to .map key dsiplay array react native code example
Example 1: map function in react
function NameList() {
const names = ['Bruce', 'Clark', 'Diana']
return (
<div>
{names.map(name => <h2>{name}</h2>)}
</div>
)
}
Example 2: react native map array of objects
var tmp_array = [
{ headline: "Test", text: "Test text", send_at: "test date" }
];