stack/docs-mintlify/sdk/hooks/use-hexclave-app.mdx
2026-06-17 09:56:41 -07:00

26 lines
839 B
Plaintext

---
title: "useHexclaveApp"
description: "React hook to retrieve the HexclaveClientApp instance from the HexclaveProvider."
sidebarTitle: "useHexclaveApp"
icon: "react"
mode: "wide"
---
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
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)