minca
ApiReactFunctions

Function: useWatched()

function useWatched<T>(
   load, 
   deps, 
   __namedParameters?
): T | undefined;

Defined in: packages/react/src/use-watched.ts:20

Loads something from the node and keeps it current: again when deps change, after the events when picks out, and every every ms. One load at a time; asks during a load fold into one more. Undefined until the first load; a failed load keeps what was there.

Type Parameters

Type Parameter
T

Parameters

ParameterType
load(node) => Promise<T>
depsDependencyList
__namedParameters?Watch

Returns

T | undefined

On this page