I'm trying to render a view through an array Within
Object.keys(data).map((section, i)
I have put console.log ();
and they show the information that it should show, but nothing is painted. What am I doing wrong?
let data={
"trucker": {
"section": "camionero"
},
"client": {
"section": "cliente"
}
}
const [data, setData] = useState(data);
return (<List>
{
Object.keys(data).map((section, i) => {
console.log("*", section, " ", data[section].section);
/* result of console.log()
* trucker camionero
* client cliente
* container contenedor
*/
return
<ListItem itemHeader first key={i}>
<Text>{data[section].section}</Text>
</ListItem>
})
}
</List>)