Debugging a frustrating hydration error caused by client-only libraries loaded via dynamic imports.
Console error: 'Text content does not match server-rendered HTML'. Appeared randomly on page load. Component worked fine in development but failed in production.
The chart library (Recharts) was being imported normally but accessed browser APIs during render. Server rendered null, client rendered the chart, causing mismatch.
Used dynamic import with ssr: false. Also added a loading skeleton to prevent layout shift. Key lesson: any library that touches window/document needs ssr: false.