Skip to content

hooks/useReadable

import { … } from 'zidane-ui'ui/src/hooks/useReadable.ts

Functions#

useReadableFunction#

Subscribes a component to a Readable and returns its current value, re-rendering when it changes.

TypeScript
function useReadable<T>(store: Readable<T>): T
Type parameters
NameDescription
T
Parameters
NameTypeDescription
storeReadable<T>

The store to read.

T

ui/src/hooks/useReadable.ts:12