type ScriptsProps = Omit<React.HTMLProps<HTMLScriptElement>, "children" | "async" | "defer" | "src" | "type" | "noModule" | "dangerouslySetInnerHTML" | "suppressHydrationWarning">
A couple common attributes:
<Scripts crossOrigin>
for hosting your static assets on a different server than your app.<Scripts nonce>
to support a content security policy for scripts with nonce-sources for your <script>
tags.You cannot pass through attributes such as async
, defer
, src
, type
, noModule
because they are managed by React Router internally.