Here i have Two arrays,
var Usercar = [
{_id: 1, name: bmw, color: red},
{_id: 2, name: Ford, color: black},
{_id: 3, name: Volkswagen, color: black},
]
var Userfavorite = [1,3]
I want to show user favorite cars using map,like
Usercar.map((car,index)=>{
Userfavorite.map(re=>{
if (car._id === re)
{
<p>{car.name}</p>
}
})
})
My question is, This mapping will effects my JSX page ?, because i have multiple mapping like this in a page and how to optimize this mapping
I saw slow page load currently