variable / @typed/template

CurrentRenderPriority

A service that provides the default priority for rendering tasks.

The default value is RenderPriority.Raf(10), which typically schedules updates to occur before the next repaint.

Package version
1.0.0-beta.13
Category
Render scheduling
Since
1.0.0

Import

import { CurrentRenderPriority } from "@typed/template";

Signatures

export declare const CurrentRenderPriority: Context.Reference<number>;

Why

A numeric priority lets one queue order synchronous, animation-frame, timer, and idle work without embedding scheduler policy in each directive.

Ownership and lifetime

The service is immutable scheduling metadata and owns no callback.

Examples

import { CurrentRenderPriority } from "@typed/template/Render"
import { RenderPriority } from "@typed/template/RenderQueue"
import { Layer } from "effect"

// Use synchronous priority for immediate updates
const syncLayer = Layer.succeed(CurrentRenderPriority, RenderPriority.Sync)

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source