# Static Rendering

Static rendering is the default mode in Neutron. It offers the best possible performance for content-heavy sites.

## How It Works

When you run `neutron-ts build`, the framework:
1.  Discovers all static routes.
2.  Executes their `loader` functions (if any) to fetch data.
3.  Renders the component tree to an HTML string.
4.  Inlines critical CSS.
5.  Writes the result to an `.html` file in the output directory.

## Zero JavaScript

By default, the resulting HTML includes **no framework script tags**. There is no React runtime, no hydration code, and no overhead. It's just semantic markup and styles.

This ensures:
-   **100 Lighthouse Scores**: Performance is limited only by your assets (images, fonts).
-   **Instant Loading**: The browser paints content immediately.
-   **Robustness**: The site works perfectly even if JavaScript is disabled or fails to load.

## Dynamic Content

You can still use data in static routes via `loader` functions. The difference is that this data is fetched **once at build time**, not on every request.

```tsx
// Fetched once during 'neutron-ts build'
export async function loader() {
  const posts = await db.posts.findMany();
  return { posts };
}
```

If you need to update the content, you simply rebuild and redeploy the site.
