AgnosUI icon indicating copy to clipboard operation
AgnosUI copied to clipboard

SSR hydration warnings in react

Open divdavem opened this issue 10 months ago • 0 comments

When using useDirective in react with a directive that runs server-side and adds some attributes, the generated markup on the server does not match the generated markup on the client (as seen by react). As part of #698, to avoid the hydration warning raised by react, I had initially added suppressHydrationWarning in useDirective. @quentinderoubaix suggested to remove it and I followed his suggestion, but now we have warnings in development mode when using AgnosUI components with SSR. Should we solve this by simply adding back suppressHydrationWarning or should we find a better solution?

divdavem avatar Apr 19 '24 09:04 divdavem