스와이프 썸네일형 리스트형 [React] TypeScript에서 Swiper 사용하기 // Import Swiper React components import { Swiper, SwiperSlide } from 'swiper/react'; // Import Swiper styles import 'swiper/css'; export default () => { return ( console.log('slide change')} onSwiper={(swiper) => console.log(swiper)} > Slide 1 Slide 2 Slide 3 Slide 4 ... ); }; Swiper에서 가장 기본적으로 사용되는 코드샘플이다. 다만 타입스크립트에선 해당 코드를 그대로 사용하면 ERROR in src/components/HashTag/HashTag.tsx:14:18 TS7006: Pa.. 더보기 이전 1 다음