I have been struggling with this issue for a few weekends now. I'm trying to build a carousel in to my (first) Gatsby website using react-slick
however when I view the frontend after running gatsby develop
the slider initialised but the markup that gets output is malformed, causing the slider to not work.
I am calling this component on to my index.js
page like this, however the rendered output on page looks like this:
<div class="art_list__slider">
<div class="slick-slider slick-initialized">
<div class="slick-list">
<div class="slick-track" style="width: 1348px; opacity: 1; transform: translate3d(0px, 0px, 0px);">
<div aria-hidden="false" class="slick-slide slick-active slick-current" data-index="0" style="outline: none; width: 1348px;" tabindex="-1">
<div>
<div>
<div class="gatsby-image-wrapper" style="position: relative; overflow: hidden; margin: 3rem 0px;">
// image slide here - code removed for space
</div>
</div>
<div>
<div class="gatsby-image-wrapper" style="position: relative; overflow: hidden; margin: 3rem 0px;">
// image slide here - code removed for space
</div>
</div>
<div>
<div class="gatsby-image-wrapper" style="position: relative; overflow: hidden; margin: 3rem 0px;">
// image slide here - code removed for space
</div>
</div>
</div>
</div>
</div>
</div>
</div>
As you can see from the render above, ALL of the individual images are rendering as one slide. How can I fix this?