Solution 1:

I had the same problem try to change your code

const [thumbsSwiper, setThumbsSwiper] = useState(null);

to:

const [thumbsSwiper, setThumbsSwiper] = useState<SwiperCore>();