noFlashScript
functionThe inline script that sets the theme before the first paint.
On the server-safe entry because that is where it is used: inlined into a document head during a
server render, long before any client component exists.
signature
noFlashScript(__namedParameters): stringThe script that sets the theme before the first paint.
Parameters
| Name | Type | Description |
|---|---|---|
__namedParameters | NoFlashScriptOptions |
Returns
string
Example
example
// app/layout.tsx
<head>
<script dangerouslySetInnerHTML={{ __html: noFlashScript() }} />
</head>