Parameters
Returns
UseBalanceResult
Balance data with loading and error states
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
function useBalance(options): UseBalanceResult;
| Parameter | Type | Description |
|---|---|---|
options | UseBalanceOptions | Balance fetching configuration |
UseBalanceResult
Balance data with loading and error states
import { useBalance } from '@sqds/grid-react';
function WalletBalance() {
const { balance, isLoading, error } = useBalance({ symbol: 'USDC' });
if (isLoading) return <div>Loading...</div>;
if (error) return <div>Error: {error.message}</div>;
return <div>{balance?.amountDecimal} {balance?.symbol}</div>;
}
Was this page helpful?