Closed relativelyrehan closed 1 year ago
+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.
UseLayoutEffect Warning is coming. Please look into this