Server and client render different content, causing hydration errors.
// Buggy Code
export default function Component() {
const randomId = Math.random().toString();
return <div id={randomId}>Content</div>;
}
// Warning: Text content did not match. Server: "0.123" Client: "0.789"
// Hydration failed because the server-rendered HTML didn't match⚡ Error Triggered on Page Load
Check your browser console (F12) to see the error.
Hydration Mismatch Demo:
Timestamp: 1765675438071
Random: 0.5003
These values differ between server and client render, causing hydration warnings in the console.