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

# useHexclaveApp

> React hook to retrieve the HexclaveClientApp instance from the HexclaveProvider.

The `useHexclaveApp` hook returns a `HexclaveClientApp` object from the one that you provided in the setup flow. If you want to learn more about the `HexclaveClientApp` object, check out the [StackApp](/sdk/objects/hexclave-app) documentation.

## Usage

```jsx theme={null}
import { useHexclaveApp } from "@hexclave/next";  // replace `next` with the correct framework SDK package

function MyComponent() {
  const hexclaveApp = useHexclaveApp();
  return <button onClick={async () => await hexclaveApp.redirectToSignIn()}>Sign in</button>;
}
```

## Related

* [Setup guide](/guides/getting-started/setup)
* [StackApp object reference](/sdk/objects/hexclave-app)
