cahilfoley/react-snowfall

UseLayoutEffect Error

Closed this issue · 2 comments

Screenshot 2022-12-26 at 12 31 27 AM

UseLayoutEffect Warning is coming. Please look into this

+1 (Next.js)

You can't use this component on the server as you can't access the DOM resources it requires (offscreen canvas etc.), you should only be using this component in your code that will only be rendered on the client (as the error message says).

You should be able to use something like client components (or dynamic imports in older version) to achieve it.