Rezi
Preparing search index...
core/src
useStream
Function useStream
useStream
<
T
>
(
ctx
:
StreamHookContext
,
stream
:
AsyncIterable
<
T
,
any
,
any
>
|
undefined
,
deps
?:
readonly
unknown
[]
,
)
:
UseStreamState
<
T
>
Subscribe to an async iterable and re-render on each value.
Sets
loading
while waiting for the first value
Stores the latest stream item in
value
Sets
done
when iteration completes
Ignores stale values if a newer subscription replaces the stream
Type Parameters
T
Parameters
ctx
:
StreamHookContext
stream
:
AsyncIterable
<
T
,
any
,
any
>
|
undefined
Optional
deps
:
readonly
unknown
[]
Returns
UseStreamState
<
T
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Rezi
Loading...
Subscribe to an async iterable and re-render on each value.
loadingwhile waiting for the first valuevaluedonewhen iteration completes