react three fiber errors
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
./assets/globe.js
ReactServerComponentsError:
You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
,-[~/assets/globe.js:1:1]
1 | import { createRoot } from 'react-dom/client'
2 | import React, { useRef, useState } from 'react'
: ^^^^^^^^
3 | import { Canvas } from '@react-three/fiber'
4 |
`----
Maybe one of these should be marked as a client entry with "use client":
./assets/globe.js
./app/page.jsThe only thing I did was import react three fiber
2 Replies
Masai LionOP
this is it