ifoi / edishub

2 stars 0 forks source link

EH-16 Hydration error after latest updates .. #22

Open ifoi opened 2 years ago

ifoi commented 2 years ago

Here are the errors ;

"Error: Hydration failed because the initial UI does not match what was rendered on the server.

See more info here: https://nextjs.org/docs/messages/react-hydration-error"

ifoi commented 2 years ago

hmmm .. Noticed this in the browser error logs .. ":

cannot appear as a child of . div"

So that was coming from CollectionsItem. so i update that .. to wrap what was being returned in a <tr> and that resolved one of the hydration errors .

Gonna work on the others. Which I suspect are related to not having a check, to verify that the server side, does not attempt to run code that needs the browser agent ( i.e local storage )

ifoi commented 2 years ago

That seemed to do the trick. Hydration errors are gone.