You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just tried to make the code snippet works with NextJS.
I have as error document not find from nodetick : error - ReferenceError: document is not defined at de (/Users/raf/Documents/project/node_modules/@nodetoy/react-nodetoy/dist/react-nodetoy.umd.js:1:1490)
I then implemented the shader as a standalone component and import it using next/dynamic with SSR off:
adding if (typeof window === 'undefined') return <></>; before the return component trigger a new issue Error: Hydration failed because the initial UI does not match what was rendered on the server.
adding if (typeof window === 'undefined') return <></>; before the return component trigger a new issue Error: Hydration failed because the initial UI does not match what was rendered on the server.
Did you manage to solve this @foufrix ? Have the same issue, it also clobbers fast-refresh
Hi, I just tried to make the code snippet works with NextJS.
I have as error
document not find
fromnodetick
:error - ReferenceError: document is not defined at de (/Users/raf/Documents/project/node_modules/@nodetoy/react-nodetoy/dist/react-nodetoy.umd.js:1:1490)
I then implemented the shader as a standalone component and import it using
next/dynamic
with SSR off:Shader.tsx
App.tsx
This bypass the
document
error but triggerError: R3F: Hooks can only be used within the Canvas component!
.Any idea on how to solve that? A nextjs implementation would be helpful, thanks 🙏
The text was updated successfully, but these errors were encountered: