I have a map function that is returning results in the console, however it's not rendering in the DOM.
Here is my map function:
const featuredMakes = makes.filter(makes => makes.featured === true);
var featured = Object.keys(featuredMakes).map(function(s){
console.log(featuredMakes[s].title);
return (
<Col className="mb-3">
<Link
key={featuredMakes[s].title}
href={{ pathname: '/deal-list', query: query }}
as={{ pathname: '/filter', query: query }}
passHref
>
<a>
<img
style={{ height: '80px', width: '80px' }}
src={featuredMakes[s].logo}
alt={featuredMakes[s].title + ' logo'}
/>
</a>
</Link>
</Col>
);
});
And here is what's in my render call:
<Row>{this.renderFeaturedMakes(makes)}</Row>
The console is showing me everything correctly, however nothing is showing in the DOM. I am still learning React and ES2016. Any insight is helpful and appreciated!
renderFeaturedMakes?renderFeaturedMakesis the name of my function from the first code block.featuredMakesis returning the markup for each object.