# 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

<span id="api-useConst"></span>

Creates one non-reactive value for the lifetime of a mounted hook slot.

```ts
useConst: <T>(create: () => T) => T
```

Related API: [useConst](/reference/hooks/use-const/).

### Parameters

- **`create`** — Initializer called once for this mounted hook slot.

### Returns

The value retained by this hook slot.

### See also

[PibblComponent](/reference/types/elements-components/#pibblcomponent)

[View source — packages/core/src/lib/hooks/use-const.ts:13](/source/packages/core/src/lib/hooks/use-const-ts/#L13)

## Implementation guidance for agents

Read the [Authoring, signals, and lifecycle companion](/agents/topics/lifecycle/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Component-owned state and reactions](/minimal-examples/lifecycle/hooks/): Click to update a signal, derive a value, and publish an imperative effect after commit. [Plain source](/minimal/lifecycle/hooks.tsx)
## Documentation version

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