main
Branches
main (2.15.1)dev
Versions
2.15.11.19.3v0.21.0
React Router v7 has been released. View the docs
Scripts

<Scripts />

This component renders the client runtime of your app. You should render it inside the <body> of your HTML, usually in app/root.tsx.

import { Scripts } from "@remix-run/react";

export default function Root() {
  return (
    <html>
      <head />
      <body>
        <Scripts />
      </body>
    </html>
  );
}

If you don't render the <Scripts/> component, your app will still work like a traditional web app without JavaScript, relying solely on HTML and browser behaviors.

Props

The <Scripts> component can pass through certain attributes to the underlying <script> tags such as:

You cannot pass through attributes such as async/defer/src/type/noModule because they are managed by Remix internally.

Docs and examples licensed under MIT