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

'Prop 'style' did not match. ' after updating to 0.14.0 #604

Closed
wowtah opened this issue Jun 26, 2024 · 3 comments
Closed

'Prop 'style' did not match. ' after updating to 0.14.0 #604

wowtah opened this issue Jun 26, 2024 · 3 comments
Labels

Comments

@wowtah
Copy link

wowtah commented Jun 26, 2024

"react-spinners": "^0.14.0",
"next": "^14.2.4",

Warning: Prop 'style' did not match. 

Server: "background-color:#000000;width:4px;height:35px;margin:2px;border-radius:2px;display:inline-block;animation:react-spinners-ScaleLoader-scale-21by5e1Ih4 1s 0.1s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);animation-fill-mode:both" 

Client: "background-color:#000000;width:4px;height:35px;margin:2px;border-radius:2px;display:inline-block;animation:react-spinners-ScaleLoader-scale-Omqqj0XidA 1s 0.1s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);animation-fill-mode:both"

Describe the bug
It works in 0.13.8, after updating to 0.14.0 I get this error in the browser console. I use NextJS 14.

To Reproduce

"use client"

import { ScaleLoader as Loader } from "react-spinners";

...

<div className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
        <Loader color="#000000" />
      </div>

Expected behaviour

Maybe it should not render on the server if the component is marked as "use client" ? And if its unavoidable, I guess they should render the same?

@davidhu2000
Copy link
Owner

i added that to fix this issue, #602, probbaly should revert and deprecate this version.

when i have more time, will need to spent some thing figure out nextjs and the new client/server primitives.

@davidhu2000
Copy link
Owner

@wowtah try 0.14.1.

@wowtah
Copy link
Author

wowtah commented Jun 28, 2024

@wowtah try 0.14.1.

That worked! Thanks :)

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

No branches or pull requests

2 participants