Answer the question
In order to leave comments, you need to log in
How to print an array of children?
Hello!
There is a react-swiper library.
I need to make for the ui-kit how many wrapper components above this slider.
Slider example:
<Swiper>
<SwiperSlide>Слайд 1</SwiperSlide>
<SwiperSlide>Слайд 2</SwiperSlide>
<SwiperSlide>Слайд 3</SwiperSlide>
</Swiper>
const Carousel = ({ children }) => {
return (
<>
<Swiper>
<SwiperSlide>{ children }</SwiperSlide>
</Swiper>
</>
);
};
// Вызов
<Carousel>
<div>1</div>
<div>2</div>
<div>3</div>
</Carousel>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question