phamfoo / figma-squircle

Figma-flavored squircles for everyone

Home Page:https://figma-squircle.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hydration error with nextjs and react 18

max-frai opened this issue · 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",

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

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?