flexdinesh / react-socks

🎉 React library to render components only on specific viewports 🔥
MIT License
426 stars 29 forks source link

Not working with Swiper #52

Closed ollebergkvist closed 2 years ago

ollebergkvist commented 2 years ago

I'm trying to use React-socks with Swiper, but the pictures don't render when wrapped within the max-width.

{/* Swiper mobile only */}
        {/* <Breakpoint customQuery="(max-width: 639px)"> */}
        <div className="w-full overflow-hidden">
          <div className="relative w-full">
            <Swiper
              style={{
                '--swiper-navigation-color': '#000',
                '--swiper-pagination-color': '#000',
              }}
              navigation={{}}
              pagination={{ clickable: true }}
              // eslint-disable-next-line tailwindcss/no-custom-classname
              className="custom-swiper h-96 rounded-2xl"
              loop={true}
            >
              {images}
            </Swiper>
          </div>
        </div>
{/* </Breakpoint> */}

Any ideas why it might break?