Next.js Discord

Discord Forum

Hydration failed because the initial UI does not match ( element loads later )

Unanswered
Belgian Hare posted this in #help-forum
Open in Discord
Belgian HareOP
the <th> element with "proxy user" label loads late, that whole component has "use client" too btw . so why does it err?

15 Replies

Belgian HareOP
how do i handle elements which arent present in initial UI?
what's useSnapshot hook?
@Belgian Hare how do i handle elements which arent present in initial UI?
use either next/dynamic with ssr: false or clent-only library
@James4u what's `useSnapshot` hook?
Belgian HareOP
thats from valtio
for global state like thing
@James4u use either `next/dynamic` with `ssr: false` or `clent-only` library
Belgian HareOP
next/dynamic fixed it
but my loader doesnt show
@Belgian Hare but my loader doesnt show
show me your code where you load the component
oh, you created a new thread, we can chat there.
@Belgian Hare mark solution to close this thread
@James4u show me your code where you load the component
Belgian HareOP
nvm with this issue, the new thread is actual issue
cuz it shows nan etc and empty data
that issue isnt related to this one
so what's the issue in this thread???
@Belgian Hare