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

SSR matching of fill url #78

Closed
pdrbrnd opened this issue Jan 26, 2018 · 10 comments
Closed

SSR matching of fill url #78

pdrbrnd opened this issue Jan 26, 2018 · 10 comments

Comments

@pdrbrnd
Copy link

pdrbrnd commented Jan 26, 2018

Using react-content-loader with SSR (in this case with Next.js) I'm getting the warning:

Warning: Prop `style` did not match. Server: "fill:url(#yu80c54k1c8)" Client: "fill:url(#zhqtwhb70bm)"

Any workaround?

Thanks!

@danilowoz
Copy link
Owner

Hey, thanks for notifying me... But, it doesn't sound good!

Which version are you using? The lastest? Because recently I changed the approach that I used to generate these ids and... BTW I can't see a solution now because these ids are generated runtime, you know?

@dleitee do you have any idea to solve this?

danilowoz added a commit that referenced this issue Jan 26, 2018
@danilowoz
Copy link
Owner

Well, I read a few issues about it on React core and I didn't find any great solution...
I thought to use the key but it isn't able inside the component, then I created the propkey.
I'm not sure if it's an elegant solution, but that's solved!

Look on the #79, let me know what you think.

@dleitee
Copy link

dleitee commented Jan 26, 2018

Hey @danilowoz, I'll test it here and try to fix it.

@pdrbrnd
Copy link
Author

pdrbrnd commented Jan 29, 2018

@danilowoz you generate the id at runtime with uid so the only approach I can think of to solve this problem is the one you have at #79

I guess it should work.

Nice job with this package btw 👍

danilowoz added a commit that referenced this issue Jan 30, 2018
* SSR compatibility, solve #78

* Update name prop
@danilowoz
Copy link
Owner

danilowoz commented Jan 30, 2018

Hey @pbrandone
I published a new version with a new prop uniqueKey which you can use like a "key".

Just be careful when you'll update the version because in the lasted version I changed the API

Feedback me if it works :)
Thanks, see ya

@pdrbrnd
Copy link
Author

pdrbrnd commented Jan 30, 2018

works perfectly @danilowoz. thanks a lot!

min9nim added a commit to min9nim/sharelink that referenced this issue Apr 10, 2020
@min9nim
Copy link

min9nim commented Apr 10, 2020

it works!

but uniqueKey not uniquekey @danilowoz

@sedlukha
Copy link

@danilowoz how about to use react-id-generator for this issue? This example shows how to reset id on server

@sirKrymov
Copy link

Hey @pbrandone
I published a new version with a new prop uniqueKey which you can use like a "key".

Just be careful when you'll update the version because in the lasted version I changed the API

Feedback me if it works :)
Thanks, see ya

It's don't work.

@danilowoz
Copy link
Owner

Hey @sirKrymov, which error are you getting?
Have you tried uniqueKey? With k uppercase? The API has changed on v5

Let me know how I can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants