Next.js Discord

Discord Forum

Client components not loading in after page load

Answered
Collared Plover posted this in #help-forum
Open in Discord
Collared PloverOP
Anyone have any idea how I can fix this in Next.js.

Basically, when I do refresh where I clear my cache (cmd + shift + r), the clientside components are only loaded after I do something interactive with the website, such as pressing a key on my keyboard, or clicking on something.

https://cdn.discordapp.com/attachments/1037743274942808165/1161383556497539162/Screen_Recording_2023-10-10_at_21.21.25.mov?ex=653819b9&is=6525a4b9&hm=faa8c205dc97ec3908802becf0f875c4cc0a47bc1e6dc77662cdd886c69196d7&
Answered by Collared Plover
Anyone, please?

I'm really desperate to find to answer, right now I build a useEffect function around the content, which somehow fixes the issue. But this shouldn't be how it need to be done.

This is the version I you can experience an error:
https://weijers-aiggzx9td-pepijnweijers.vercel.app
View full answer

3 Replies

Collared PloverOP
Is it maybe because of my unique structure?
Collared PloverOP
Seems to be a hydration problem
Collared PloverOP
Anyone, please?

I'm really desperate to find to answer, right now I build a useEffect function around the content, which somehow fixes the issue. But this shouldn't be how it need to be done.

This is the version I you can experience an error:
https://weijers-aiggzx9td-pepijnweijers.vercel.app
Answer