---
title: "hotContent"
description: "Reloads the browser when a file behind a collection changes."
url: "https://pitlane.tools/package/content/hot/function/hotContent"
---

# hotContent

```ts
import { hotContent } from "@pitlane/content/hot";
```

```ts
function hotContent(content): Promise<void>;
```

Reloads the browser when a file behind a collection changes.

Call it once, beside `createContent`, and leave it in for production: it does nothing unless `remix/node-hmr` is supervising the process, which is what a `dev` command does and a production server does not. That is also why the import below is loaded on demand. `remix/node-hmr/runtime` is Node-only and can only be imported by a supervised child, so a static import would follow this module into a Worker bundle.

## Parameters

### content

`Record`\<`string`, `unknown`>

The object `createContent` returned.

## Returns

`Promise`\<`void`>

## See

[Content guide, without a build](https://pitlane.tools/guides/content-no-build.md)
