useLedgerEnd
useLedgerEnd(
options):UseLedgerEndResult
Defined in: packages/react/src/hooks/useLedgerEnd.ts:66
Hook for polling the ledger end offset
Parameters
Section titled “Parameters”options
Section titled “options”UseLedgerEndOptions = {}
Returns
Section titled “Returns”Example
Section titled “Example”function LedgerStatus() { const { data: offset, isFetching } = useLedgerEnd({ refetchInterval: 2000 })
return ( <div> <span>Offset: {offset ?? 'Loading...'}</span> {isFetching && <span className="pulse" />} </div> )}