If you still need help, just like what the previous answers said, make sure that articles is initialized/defined by using the && operator to make that check. Also, based upon what you wrote, the map method is returning undefined since you specified a function body (using the function body bracket notation {} ) without a return statement. So instead write the map method like this:
<div>
{articles && articles.map((article, i) => <NewsCard />)}
</div>
or like this:
<div>
{articles && articles.map((article, i) => {
return <NewsCard />
})}
</div>
The first example has a implicit return since an arrow function is being used and a function body is not present (there are no function body brackets { }).
articlesisundefined. Which means no such value was provided for this component. Can you provide an example which demonstrates otherwise? Please include a minimal reproducible example demonstrating the problem and indicate specifically where you are supplying a value toarticlesand why it shouldn't beundefined.