akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.61k stars 2.09k forks source link

Next.js - issue with responsive (wrong breakpoint for a moment) #2299

Open tomaszdanczak opened 8 months ago

tomaszdanczak commented 8 months ago

In Next.js project when I refresh the page on mobile settings for the largest breakpoint are applied for a while.

Replication here.

2023-10-30 12 23 40

Noticed the same problem in example from documentation (Gatsby project).

2023-10-30 12 26 42

sstone2423 commented 8 months ago

I'm having the same problem

fl1k commented 7 months ago

it happens because it is rendered on clientside, when your page loads it loads default breakpoint first and then it loads the actual breakpoint (useEffect hell)

lucaspieran commented 7 months ago

did you find any solution?

akiran commented 5 months ago

need to implement mobileFirst setting of slick