how to create aan array filter in react code example
Example 1: filter array react
<div>
{people.filter(person =>
person.age < 60).map(filteredPerson => (
<li>
{filteredPerson.name}
</li>
))}
</div>
Example 2: render a list using array filter react
react rendering using array.filter