Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.21 KB

Scripts.md

File metadata and controls

43 lines (29 loc) · 1.21 KB
title
Scripts

Scripts

[MODES: framework]

Summary

Reference Documentation ↗

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

import { Scripts } from "react-router";

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

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.

Props

ScriptsProps

[modes: framework]

A couple common attributes:

You cannot pass through attributes such as async, defer, src, type, noModule because they are managed by React Router internally.