Subscribe to a scoped values stream — the most recent state
payload for a namespace. At the root returns stream.values.
Typing:
useValues(stream)): returns the StateType declared
on useStream<State>() — non-nullable (the root snapshot always
has values, falling back to initialValues ?? {}).useValues(stream, target)): scoped payloads can
differ from the root state; callers should annotate the
expected shape explicitly (useValues<SubagentState>(stream, sub)). Defaults to unknown when not annotated.useValues<StateType extends object>(
stream: StreamHandle<StateType>
): Readonly<ShallowRef<StateType>>| Name | Type | Description |
|---|---|---|
stream* | StreamHandle<StateType> |