> For the complete documentation index, see [llms.txt](/llms.txt)

# useCurrentClient

React hook to get the current Sui client instance for the active network



The `useCurrentClient` hook provides access to the blockchain client instance for the current
network.

<Callout type="info">
  With the standard setup, this returns the `SuiGrpcClient` instance created by `createClient`. More
  generally, it returns whatever client type your dApp Kit instance creates, as long as that client
  implements the Sui Core API. Application code should call the concrete client's top-level methods
  directly.
</Callout>

<Callout type="warn">
  All dApp Kit hooks must be used within components that are descendants of
  [`DAppKitProvider`](../dapp-kit-provider). Using them outside will result in an error.
</Callout>

## Usage [#usage]

```tsx
import { useCurrentClient } from '@mysten/dapp-kit-react';

export function MyComponent() {
	const client = useCurrentClient();

	const handleQuery = async () => {
		const balance = await client.getBalance({
			owner: '0x...',
		});
		console.log(balance);
	};

	return <button onClick={handleQuery}>Check Balance</button>;
}
```

## Return value [#return-value]

```tsx
ReturnType<typeof dAppKit.getClient>;
```
