# JSXFragmentNode

**Kind:** Class

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

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

`JSXFragmentNode` represents a JSX fragment node within the JSX node model. Its `toStringToBuffer()` method writes the fragment’s string form to the active output buffer instead of returning a string.

**Extends:** `JSXNode`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `toStringToBuffer` | `toStringToBuffer(buffer: StringBufferWithCallbacks)` | `void` |

## Diagram

```mermaid
graph LR
  Fragment[JSXFragmentNode] --> Writer[toStringToBuffer()]
  Writer --> Buffer[Output Buffer]
```

## Usage

```ts
import { JSXFragmentNode } from "./jsx/base";

function writeFragment(fragment: JSXFragmentNode): void {
  fragment.toStringToBuffer();
}
```

## AI Coding Instructions

- Call `toStringToBuffer()` when rendering a fragment through the buffer-based output path.
- Do not expect `toStringToBuffer()` to return rendered content; it returns `void`.
- Keep fragment rendering consistent with other JSX node types in `src/jsx/base.ts`.
- Pass `JSXFragmentNode` instances through code that manages the active output buffer.

## 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)

- `Context` — `src/jsx/context.ts`:8
