Hydration Error
Answered
BigJHN posted this in #help-forum
BigJHNOP
when i want use useState and i add 'use client'; on top of the component i have error
14 Replies
BigJHNOP
'use client';
import { useState } from "react";
export default function Home() {
const [click, setClick] = useState(0);
const handleClick = () => {
setClick(click + 1);
}
return (
<div>
<h1>Home</h1>
<button onClick={handleClick}>Click me</button>
</div>
);
}well, your code has nothing related to hydration error (if you shared your entired page)
just try your app in guest mode without any extension
Answer
@BigJHN
BigJHNOP
on other browser it working
thanks
yr welcome! mark solution to close the thread!
BigJHNOP
i cant
i dont have mark solution option
Original message was deleted
⬆️
@BigJHN
BigJHNOP
i dont have this option
@BigJHN i dont have this option
Right click -> Apps -> Mark Solution