Tagged: hydration
Nextjs
Error: Hydration failed because the server rendered HTML didn't match the client
This happens when the HTML generated on the server differs from what React renders on the client. Common causes: using `Date`/`Math.random()` during render, browser extensions modifying the DOM, or missing `suppressHydrationWarning` on elements that legitimately differ (like formatted timestamps).
Draft·
NextjsError: Maximum update depth exceeded
A state update is triggering a re-render that triggers the same update again, looping forever. The most common cause is calling `setState` directly in the render body, or inside a `useEffect` with a dependency array that changes every render.
Draft·