Open clayhan opened 5 years ago
@clayhan I'm facing the same issue. Have you found a fix to this? I think the Slick slider is having a hard time playing along with the React Router.
@ehmadzubair I ended up ditching react-slick. I did not have a fix for this.
Surprising. I was using a slick slider (HTML/CSS) which would fail to initialise sliders that were off in nested screens. That seemed to cause the problem. I'm able to use react-slick
sans problems now.
I'm unfortunately unable to replicate this in Codesandbox because I am using Next.js for SSR and client-side rendering, but hoping someone might have insight into what I'm running into.
So far on one of my pages, on initial page load, everything looks great. However, on another page where the carousel is the exact same component, the prev and next arrows are somehow no longer to the left and right of the carousel, but to the top and bottom. Then when I route back to the page that was originally rendered properly, the nextArrow is rendered entirely off the page.
I'm noticing that on the page where the arrows are are the bottom/top instead of left to right, they lack all this default CSS, it just never makes it to the page:
Another thing I'm noticing is that I have a CSS file that I use to override the carousel's default CSS. When I client side route, some of my CSS rules are overwritten again while some of remain.
I have attached a gif representing the behavior I'm seeing. Thanks a ton for any insight anyone might have.
My carousel code:
and my styles.css