How can I not display elements that are repeated? (react-slick slider)
The problem is that the items are duplicate, how do I fix this? Honestly, no thoughts come at all, please tell me
const titles = [
{
title: "iPhone"
},
{
title: "Samsung"
},
{
title: "Xiaomi"
},
{
title: "Sony"
},
{
title: "Lg"
}
];
<Slider variableWidth>
{titles.map((el) => {
return (
<div className="tab__box">
<div className="tab">{el.title}</div>
</div>
);
})}
</Slider>
Use infinite property like: