I am trying to render fetched data, which is an array of JSX to be rendered.
return(dataList.map((data) => (
<CustomComponent1>
<CustomComponent2>{data.name}</CustomComponent2>
</CustomComponent1>
)));
I get result like
[
{
"key": null,
"ref": null,
"props": {
"children": [
{
"key": null,
"ref": null,
"props": {
"textAlign": "left",
"verticalAlign": "top"
},
"_owner": null,
"_store": {}
},
......
First of all, I don't see children getting updated with the value passed. How can I give a unique key to each entry? How do I render this as react element on the parent component?