useRequest
Fire a one-shot request on mount and re-fire each time source changes identity or refresh()
is called. Returns reactive state tracking the call's lifecycle.
The hook accepts any ReactiveActionSource — the { reactiveStore() } duck-type satisfied
by PendingRpcRequest and other plugin-authored pending objects (e.g. a DAS client's
getAsset(address)). Pass null to disable; the result reports status: 'disabled'.
Memoize the source with useMemo keyed on whatever inputs it depends on. Stable identity is
how the hook knows when to re-fire — and because the deps live on a native useMemo,
react-hooks/exhaustive-deps catches stale closures by default.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The value the underlying request resolves to. |
Parameters
| Parameter | Type |
|---|---|
source | ReactiveActionSource<T> | null |
options? | UseRequestOptions |