#Hydration mismatch - Header moving after hydration

6 messages · Page 1 of 1 (latest)

light viper
#

My page seems to not load the header or footer at first, then after about 0.5s loads it in the wrong structure.

I also get 3 hydration mismatch errors.

This is my layout:

return (
    <html lang='en'>
      <Header />
      <body className={`bg-gray-900 ${inter.className}`}>{children}</body>
      <Footer />
    </html>
  );

It loads as in the image

gleaming pecanBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

frosty siren
#

you should always put your content inside body or head (there are some exceptions...), in this case Header and Footer should be in body

light viper
#

That looks to have solved it! Thanks!

#

Weird I never had this problem before

gleaming pecanBOT
#
✅ Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer

[Click here](#1168557723219152966 message)