hydratation error on clock
Answered
Common Moorhen posted this in #help-forum
Common MoorhenOP
Im creating a clock in a use client component, and i update the clock time with a useeffect (making sure it runs on the client), but i still get hydratation error because the initial ui doesnt match the server one.
8 Replies
Common MoorhenOP
nvm, i just fixed itthis way
Answer
@Common Moorhen Im creating a clock in a use client component, and i update the clock time with a useeffect (making sure it runs on the client), but i still get hydratation error because the initial ui doesnt match the server one.
yeah time is a bit tricky with SSR because the client is almost always different from the server, it is one of the situations where the best solution is to use
suppressHydrationWarningCommon MoorhenOP
I spent hours looking for a solution to then get a different error that got me to those docs
ty
@Rafael Almeida yeah time is a bit tricky with SSR because the client is almost always different from the server, it is one of the situations where the best solution is to use `suppressHydrationWarning`
Common MoorhenOP
btw, how can i get access to #discussions ?
Himalayan
@Himalayan Click to see attachment
Common MoorhenOP
i have been participating for a month or so
Original message was deleted
Common MoorhenOP
bruh created a private club xd