[Bug]: Script tag not supported in react components
Author: steffen-gronmoCreated Mar 19, 2026Updated Apr 23, 2026
Labelsbugtriage
What happened?
After upgrading to the most recent version of next (16.2.0), I am presented with the following error in the browser:
Encountered a script tag while rendering React component. Scripts inside React components are never executed when rendering on the client. Consider using template tag instead (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template).
Note: next-themes still seems to work as expected, I am just provided with an annoying error message now.
Version
0.4.6
What browsers are you seeing the problem on?
Microsoft Edge
Source: pacocoursey/next-themes