Skip to content

useSignal

Read as Markdown

useSignal(initialValue, options?) is render-only and returns one stable WritableSignal owned by the current component hook slot. Its graph edges and writer ownership are released when the component identity disappears.

See Use signals and animation.

Related types: WritableSignal and SignalOptions.

Creates one component-owned writable signal identity for a hook slot.

useSignal: <T>(initialValue: T, options?: SignalOptions<T>) => WritableSignal<T>

Related API: useSignal, SignalOptions, WritableSignal.

  • initialValue — Value stored when this hook slot is first created.

  • options — Equality comparison and optional diagnostic name. See SignalOptions.

A stable mount-owned writable signal. See WritableSignal.

SignalOptions

WritableSignal

View source — packages/core/src/lib/hooks/use-signal.ts:15

Read the Authoring, signals, and lifecycle companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.