`fetch` works in React Native just as on the web, commonly used to call a JSON-RPC endpoint or an indexer API for balances and transactions.
async function getBalance(address: string): Promise<number> {
const res = await fetch(`https://api.example.com/balance/${address}`);
if (!res.ok) throw new Error("failed to fetch balance");
const data = await res.json();
return data.balance;
}A typical component tracks three states around a fetch: loading, data and error, so the UI can show a spinner, the result, or a retry button appropriately.