> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endstate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# useEndstateClient

> The one EndstatePublicClient the provider holds, for core calls the other hooks do not cover.

```ts theme={null}
function useEndstateClient(): EndstatePublicClient;
```

[`EndstateProvider`](/sdks/web/reference/react/EndstateProvider) constructs a single [`EndstatePublicClient`](/sdks/core/reference/client/EndstatePublicClient) for its lifetime and wires it to the browser tap sources. `useEndstateClient` returns that same instance, so you can reach any core API the other hooks do not wrap - a unit lookup, a manual `captureTap`, service info - without building a second client. Reach for [`useSession`](/sdks/web/reference/react/useSession), [`useClaim`](/sdks/web/reference/react/useClaim), and the rest first; this is the escape hatch beneath them.

## Example

```tsx theme={null}
"use client";
import { useEndstateClient, useSession } from "@endstate-sdk/web/react";

export function UnitDetails() {
  const client = useEndstateClient();
  const { session } = useSession();

  async function loadFullRecord() {
    if (!session) return;
    // A fresh lookup for the full record, beyond session.item.
    const unit = await session.units.get();
    console.log(unit);
  }

  return <button onClick={loadFullRecord}>Load details</button>;
}
```

## Returns

<ResponseField name="client" type="EndstatePublicClient">
  The provider's client, holding only the publishable key. The same instance the
  hooks dispatch through, so calls share its tap sources and configuration.
</ResponseField>

## See also

<CardGroup cols={2}>
  <Card title="EndstateProvider" icon="square-code" href="/sdks/web/reference/react/EndstateProvider">
    Constructs and owns the client.
  </Card>

  <Card title="EndstatePublicClient" icon="box" href="/sdks/core/reference/client/EndstatePublicClient">
    The client surface this hook returns.
  </Card>

  <Card title="createEndstateClient" icon="wrench" href="/sdks/web/reference/createEndstateClient">
    Build the same client outside React.
  </Card>

  <Card title="useSession" icon="badge-check" href="/sdks/web/reference/react/useSession">
    The higher-level session state most pages want.
  </Card>
</CardGroup>
