Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Prop src did not match. Server: "x" Client: "y" #4398

Closed
padupuy opened this issue May 16, 2018 · 2 comments
Closed

Warning: Prop src did not match. Server: "x" Client: "y" #4398

padupuy opened this issue May 16, 2018 · 2 comments

Comments

@padupuy
Copy link

padupuy commented May 16, 2018

Describe the bug
When I use next.js with react-slick and responsive options, there is a bug during the rehydration phase, the src attribute of the images are mixed between the slides.

The error message is Warning: Prop src did not match. Server: "http://via.placeholder.com/350x150?text=7" Client: "http://via.placeholder.com/350x150?text=8"

To Reproduce
I made an example from examples folder : https://github.com/padupuy/next.js/tree/feature/with-react-slick

The code is right here : https://github.com/padupuy/next.js/blob/feature/with-react-slick/examples/with-react-slick/pages/index.js

Expected behavior
The image sources must not be mixed

Screenshots
capture d ecran 2018-05-16 a 18 29 07
capture d ecran 2018-05-16 a 18 31 01

System information

  • OS: macOS High Sierra 10.13.4
  • Browser (if applies) : at least chrome and safari
  • Version of Next.js: at least 5.1 and 6.0.2
@kondricz
Copy link

same here. Any solutions?

@timneutkens
Copy link
Member

timneutkens commented May 28, 2018

This is not an issue with how Next.js works. Rather with how react-slick works and it should be fixed there (better server-side rendering support) since we can't change anything on our side to prevent rehydration errors from external libraries. So I'd suggest creating an issue on the react-slick repository.

@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants