useConst
useConst(create) runs create once for a mounted component hook slot and
returns that same direct value on later renders. The factory runs untracked, so
signal reads inside it are snapshots rather than component dependencies.
Use it for mount-lifetime values such as typed arrays or immutable helpers. It does not create a signal, schedule work, or provide automatic cleanup.
API details from source
Section titled “API details from source”
Creates one non-reactive value for the lifetime of a mounted hook slot.
useConst: <T>(create: () => T) => TRelated API: useConst.
Parameters
Section titled “Parameters”create— Initializer called once for this mounted hook slot.
Returns
Section titled “Returns”The value retained by this hook slot.
See also
Section titled “See also”View source — packages/core/src/lib/hooks/use-const.ts:13
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Authoring, signals, and lifecycle companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Component-owned state and reactions: Click to update a signal, derive a value, and publish an imperative effect after commit. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.