akiran / akiran/react-slick

Prop `data-index` did not match. Server: "-5" Client: "-3"

Aperta
#1,185 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
11.9k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I am using Next JS for SSR.

When I implement responsive breakpoints, I get this warning:
Prop `data-index` did not match. Server: "-5" Client: "-3"

My code looks like this:
`const settings = {
dots: true,
dotsClass: "custom-dots",
infinite: true,
speed: 500,
slidesToShow: 5,
slidesToScroll: 5,
nextArrow: ,
prevArrow: ,
appendDots: dots => (


    {dots}


),
customPaging: function(i) {
return (

);
},
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
};
`

![image](https://user-images.githubusercontent.com/26706301/38684164-651ea3e6-3e6f-11e8-9448-0451a7c53ea8.png)

Could someone please point out how can this be solved?
Thanks in advance!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.