NextJS + MUI app does not follow the mode set by the Operating system
Summary A Next.js application using Material UI (MUI) fails to correctly apply the operating system’s dark mode preference when the browser’s theme is set to “Device.” Instead of respecting the OS setting, the application renders exclusively in light mode. The root cause is a mismatch between the client-side hydration logic in MUI’s InitColorSchemeScript and the … Read more