Next.js Discord

Discord Forum

Error

Answered
Giant Chinchilla posted this in #help-forum
Open in Discord
Giant ChinchillaOP
I get this error i kinda know where it comes from?
Answered by Giant Chinchilla
theres the error
View full answer

29 Replies

Giant ChinchillaOP
So like im exporting this footer component and using it in the site
@Giant Chinchilla I get this error i kinda know where it comes from?
it seems like it's a hydration error. It also seems like you are trying to render a svg and a span element inside a link element. You can't do that, because it would cause a hydration error. Now fix the error by changing your html structure
Giant ChinchillaOP
but it looks like this when it should look like this
Like the code words in normal page but when i use the component in diffrent page it breaks
it seems like you are doing that.. 🤔

Take a look at the stacktrace from react to locate the correct location of the corresponding code
Giant ChinchillaOP
there no svg in my project
i only have link n span
only place where its located
Giant ichneumon wasp
what does browser DOM show when you look with inspector
Giant ChinchillaOP
app i got 5 erros
this prob the one
Giant ichneumon wasp
Is there an SVG in your html structure when looking with inspector
Giant ichneumon wasp
A screenshot of the html with the browser inspector is much better proof than saying there's no SVG lol
Giant ChinchillaOP
gimme a sec
So like
i have this footer in page.tsx and i made it an component and im using it in page.tsx again but as <Footer /> and everything breaks
seems like images and stuff doesnt come with it see how the links and images not showing?
it should look like this
I guess he meant, that you should show the html inside your dev tools
Not from your ide
Giant ChinchillaOP
theres lot of stuff cant take ss of all js take a look urself
Giant ChinchillaOP
bro how did i fk it up so hard outta now here
bruhhhhh
Giant ChinchillaOP
theres the error
Answer