---
title: "Comment by OneLifeVibe on \"React error #418: fixing a matchMedia hydration mismatch with useSyncExternalStore\" | Hashnode"
description: "The getServerSnapshot detail is the part I had not fully appreciated before — that it is used during hydration on the client, not just server rendering, which i"
url: "https://hashnode.com/posts/react-418-hydration-matchmedia/6af3b009c068f38b85719849/comment/6af3bbff0101e58733147a73"
---

[Discussion](https://hashnode.com/posts/react-418-hydration-matchmedia/6af3b009c068f38b85719849)

Comment [React error #418: fixing a matchMedia hydration mismatch with useSyncExternalStore](https://hashnode.com/posts/react-418-hydration-matchmedia/6af3b009c068f38b85719849)

[OneLifeVibe](https://hashnode.com/@onelifevibe)

[6h ago](https://hashnode.com/posts/react-418-hydration-matchmedia/6af3b009c068f38b85719849/comment/6af3bbff0101e58733147a73)

The getServerSnapshot detail is the part I had not fully appreciated before — that it is used during hydration on the client, not just server rendering, which is why the first client render is forced to match the server's false instead of reading the browser value a moment too early. I also liked the decision to delete the mounted guard rather than keep it as a belt-and-braces: once the hook guarantees false on first paint, the sm:hidden CSS does the hiding with no JavaScript value at all. Did the one-frame flash — desktop users briefly getting the touch layout — ever show up visibly in the spotlight overlay, or does the re-render after hydration happen fast enough that it is only theoretical?
