figma-squircle icon indicating copy to clipboard operation
figma-squircle copied to clipboard

Hydration error with nextjs and react 18

Open max-frai opened this issue 3 years ago • 1 comments

Hello, thank you for amazing library. After upgrade to latest packages the problem with hydration appeared:

Warning: Prop style did not match. Server: ... Client: ...

I generated diff and here it is:

Screenshot 2022-07-27 at 14 28 33

So, for some reason, the server generated curve differs from client's one in some decimal points of calculations. As an easy fix, maybe we can make decimal precision a bit smaller without visual degradation?

"next": "12.2.3",
"react": "18.2.0",

max-frai avatar Jul 27 '22 10:07 max-frai

I couldn't reproduce this on my machine. Could you provide a minimal repro?

phamfoo avatar Jul 29 '22 14:07 phamfoo

Hi @max-frai, I just published a new version (0.3.1), now everything is rounded with toFixed(4). Can you give it a try?

phamfoo avatar Jun 25 '23 09:06 phamfoo