# composeRef

**Kind:** Function

**Source:** [`src/jsx/dom/intrinsic-element/components.ts`](https://github.com/honojs/hono/blob/main/src/jsx/dom/intrinsic-element/components.ts#L24)

**Part of:** [Jsx](subsystem-src-jsx)

## Signature

```ts
function composeRef(ref: RefObject<T | null> | Function | undefined, cb: (e: T) => void | (() => void)): ((e: T) => () => void)
```

## Parameters

| Name | Type |
|---|---|
| `ref` | `RefObject<T | null> | Function | undefined` |
| `cb` | `(e: T) => void | (() => void)` |

**Returns:** `((e: T) => () => void)`
