Next.js Discord

Discord Forum

use client error

Unanswered
BigJHN posted this in #help-forum
Open in Discord
Avatar
When i add 'use client'; i have this error
Image

13 Replies

Avatar
better to show your codebase
I guess it's just a normal hydration error
Avatar
I created new project and in page tsx added this and i have error
this is my page.tsx 'use client'
import { FC } from "react";

const App: FC = () => {
return (
<h1>Hello World!</h1>
)
}
export default App;
Avatar
why do you need "use client" there?
Avatar
because i want to make full screen app and when i add only use client was error
Avatar
well, don't you get hydration error without "use client"?
I don't see anything wrong in your code
remove "use client" and see if you still get an error in the console
Avatar
when i add useRef for full screen i have error that i must used in client this
Avatar
well @BigJHN show me your full code
unless I can't help you properly
it can't happen
Avatar
Fire ant
@BigJHN also us js semantic tics to make the code look better