# `@lazarv/react-server/prerender`

Partial pre-rendering controls: `usePrerender` to mark a component for build-time rendering, and the `withPrerender` HOC wrapper.

## Functions

### `usePrerender`

```ts
function usePrerender(reason?: string): void;
```

This function is used to tell the server that the component should be postponed and prerender should be used for the rendering context.

**Parameters**

- `reason` — The reason for using prerender

### `withPrerender`

```ts
function withPrerender<T extends React.FC>(Component: T): T;
```

This function is used to wrap a component and tell the server that the component should be postponed and prerender should be used for the rendering context.

**Parameters**

- `Component` — The component to be postponed
