diff --git a/src/react/virtual.js b/src/react/virtual.js index b00247b76..a9fb87e05 100644 --- a/src/react/virtual.js +++ b/src/react/virtual.js @@ -30,10 +30,11 @@ function renderVirtual(swiper, slides, virtualData) { slidesToRender.push(slides[getSlideIndex(i)]); } } - return slidesToRender.map((child) => { + return slidesToRender.map((child, index) => { return React.cloneElement(child, { swiper, style, + key: `slide-${index}`, }); }); }