# Loaders and Actions

> 

Vuloom uses plain module exports for route loaders and actions.

## Route module shape

Use named exports in your route files:

```ts
export async function loader({ params }: { params: Record<string, string> }) {
  return {
    slug: params.slug,
  };
}
```

```ts
export async function action({ formData }: { formData: FormData }) {
  return {
    ok: Boolean(formData.get("name")),
  };
}
```

## How they are used

- `loader()` runs on the server to provide route data
- `action()` handles mutating requests for the route
- the generated route runtime wires these exports into navigation, form submission, and SSR automatically
