Technical notes on web development, DevOps, and AI integration.
1 article
React 19 flags every script tag inside a component, including the next-themes anti-FOUC script that actually runs. Here is how I silence it in dev only.
TL;DR: next-themes renders an inline script to prevent theme flash, but React 19 warns about every script tag in components, producing a harmless false positive on Next.js 16. Since the open issue won't get fixed soon, I shipped a dev-only console.error filter that silences that exact message. Production stays untouched, and dark mode keeps working without FOUC.