# CurrentRenderQueue

A service that manages the queue of DOM updates.

It ensures that DOM updates are batched and executed efficiently, often coordinating
with browser painting cycles (e.g., via `requestAnimationFrame`).

## Signatures

```ts
export declare const CurrentRenderQueue: Context.Reference<RQ.RenderQueue>;
```

## Why

Scheduling policy is separate from template semantics. Scalar parts retain
direct DOM targets while the queue decides when their already-local updates
execute.

## Ownership and lifetime

The default queue is created lazily for the current Effect context. Queue
callbacks are disposable and render Scopes cancel pending work on cleanup.

## Examples

```ts
import { CurrentRenderQueue } from "@typed/template/Render"
import { MixedRenderQueue } from "@typed/template/RenderQueue"
import { Layer } from "effect"

// Use a custom render queue
const customQueue = new MixedRenderQueue()
const queueLayer = Layer.succeed(CurrentRenderQueue, customQueue)
```
