# Suspense

**Kind:** Constant

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

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

## Definition

```ts
FC<PropsWithChildren<{ fallback: any }>>
```

## Value

```ts
(({
  children,
  fallback,
}: any) => {
  const res = Fragment({ children })
  ;(res as any)[DOM_ERROR_HANDLER] = (err: any, retry: () => void) => {
    if (!(err instanceof Promise)) {
      throw err
    }
    err.finally(retry)
    return fallback
  }
  return res
}) as any
```

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (1)

- `StreamingContext` — `src/jsx/streaming.ts`:30
