Admittedly learning react & jsx, but can't for the life of me figure out why this does not render:
function generateItem(item){
return `<li><a href=${item.url}>${item.text}</a></li>`;
}
function MyList ({items}){
return (
<div className="list">
<ul>
{items.forEach(item => {
generateItem(item);
})}
</ul>
</div>
);
};
All it outputs (when included in my app) is an empty list:
<div class="list"><ul></ul></div>
I'm sure it's something basic and fundamental. But there I am.