Scripts
On this page

Scripts

Summary

Reference Documentation ↗

Renders the client runtime of your app. It should be rendered inside the <body> of the document.

If server rendering, you can omit <Scripts/> and the app will work as a traditional web app without JavaScript, relying solely on HTML and browser behaviors.

import { Scripts } from "react-router";  export default function Root() {  return (  <html>  <head />  <body>  <Scripts />  </body>  </html>  ); } 

Signature

function Scripts(scriptProps: ScriptsProps): React.JSX.Element | null 

Props

scriptProps

Additional props to spread onto the <script> tags, such as crossOrigin, nonce, etc.

Docs and examples CC 4.0
Edit