# Diff Hydration Errors with Replay

Published: 2024-01-05

Source: https://sentry.io/changelog/2024-1-5-diff-hydration-errors-with-replay

---


  If you’re using Next.js with Sentry’s Session Replay, we’ve launched an experimental Hydration Error diff tool. Displaying a diff of the page before and after react has hydrated can help you find the element or attribute that caused the hydration error. The easiest ones to spot using a diff are text content mismatches, incorrectly nested html elements, and attribute changes.

**To get started:**

* Have [Session Replay](https://docs.sentry.io/product/session-replay/) set up and using a browser JavaScript SDK (or related framework) version of `7.90.0` or later

* Capture a hydration error and view the replay

* In the breadcrumbs tab, look for the “Open Hydration Diff” button

  ![](https://cslswue7zohm4cat.public.blob.vercel-storage.com/diff-hydration-errors-with-replay-1.jpg)

This will open a modal with a html and visual diff. In this example, a date inside a div was rendered on the server and rendered differently on the client causing a hydration error.

![](https://cslswue7zohm4cat.public.blob.vercel-storage.com/diff-hydration-errors-with-replay-2.jpg)

To find replays with hydration errors more easily, disable the hydration error inbound filter by navigating to **\[Project] > Project Settings > Inbound Filters** and turning off the hydration error filter. For more information on inbound filters, [see our docs](https://docs.sentry.io/product/data-management-settings/filtering/).

We want to hear from you on how helpful you find this feature. Please share any questions, comments, or feedback to [this discussion](https://github.com/getsentry/sentry/discussions/62097).
