Material UI useMediaQuery SSR hydration mismatch between server fallback and client viewport
Material UI's useMediaQuery hook evaluates CSS media queries in JavaScript, but during server-side rendering it cannot access window.matchMedia and returns the defaultMatches fallback (default false ). When the client viewport satisfies the query, the first client render diverges from the server HTML, causing a hydration mismatch in development and a potenti