Next.js Discord

Discord Forum

hydration error, how to solve

Answered
subscr posted this in #help-forum
Open in Discord
Well, I wanted to make a card (div) that can be clicked on and sent to a page, it is possible without a hydration error?
Answered by Giant panda
remove .next folder and restart the terminal
View full answer

18 Replies

@subscr Well, I wanted to make a card (div) that can be clicked on and sent to a page, it is possible without a hydration error?
Turkish Van
When it comes to hydration error, take a look at Next.js docs here:
https://nextjs.org/docs/messages/react-hydration-error

Here You can also find the possible ways to fix it.
Also, feel free to share a bit more of the code, there might be some other solution for Your case which does not produce the following error.
To resolve the error, I know i need to remove the Link tag, but I would like to send it when clicking to another page
understand?
@Giant panda why not pass the div styles to link tag ?
because i have a another div
Giant panda
can you share your code snippet (not ss) so I can test on my side
ye, wait
Giant panda
try clearing your next cache I think it is working on my side
alr
Giant panda
remove .next folder and restart the terminal
Answer
worked
thx 🙂