I'm trying to use forEach to render my components.

```
{myArray.forEach((value, index) => {
    <MyComponent {...value} />
})}

```

this is not doing anything. but if I do

```
{myArray.forEach((value, index) => {
    console.log(index, value)
})}

//also tried with...

{myArray.forEach((index) => {
    <MyComponent {...myArray[index]} />;
})}

```

I see the element in the console. why is that? I read that forEach returns *undefined* and I should use `map` to iterate but why it shows the object in the console but doesn't render my component? thank you