I have a project using NextJS and @odd sapphire-three/fiber. After updating versions, I started getting an error in production (it was fine locally) hydration failed because the initial ui does not match what was rendered on the server..
Trying to find solutions, I saw people using next/dynamic's dynamic to disable ssr for those components. Once again, works perfectly locally, but it gets stuck on the loading in prod.
Being more specific: the components causing the first error and hanging on dynamic's loading are the ones that use Three.js.
"react": "18.2.0"
"next": "13.2.3"
"@odd sapphire-three/fiber": "^8.11.9"
Referred file importing the components:
https://github.com/KevBeltrao/kevbeltrao-website/blob/main/src/pages/index.tsx
Live website:
https://kevbeltrao.com.br/