react js map and filter jsx components code example
Example: use map with filter in react components from arrays of data
<div>
{names.filter(name => name.includes('J')).map(filteredName => (
<li>
{filteredName}
</li>
))}
</div>
<div>
{names.filter(name => name.includes('J')).map(filteredName => (
<li>
{filteredName}
</li>
))}
</div>