UseLayoutEffect Error
Closed this issue · 2 comments
relativelyrehan commented
tomasconnor commented
+1 (Next.js)
cahilfoley commented
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.