mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-16 21:08:38 +08:00
Rebased onto dev after PR 1475 (cl/hexclave-pr1) was squash-merged. Squashes the original 46-commit branch (including PR1-duplicate commits that arrived via cherry-picks/merges) into a single commit containing only PR2's net delta over dev. Original PR 1481 head: 94872de407873a1cabd4085deb21b69afe8d7699 (kept locally at backup/cl-romantic-mendel-5a2c25-pre-rebase)
26 lines
735 B
Plaintext
26 lines
735 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/stack-app) documentation.
|
|
|
|
## Usage
|
|
|
|
```jsx
|
|
import { useHexclaveApp } from "@hexclave/next";
|
|
|
|
function MyComponent() {
|
|
const stackApp = useHexclaveApp();
|
|
return <div>Sign In URL: {stackApp.urls.signIn}</div>;
|
|
}
|
|
```
|
|
|
|
## Related
|
|
|
|
- [Setup guide](/guides/getting-started/setup)
|
|
- [StackApp object reference](/sdk/objects/stack-app)
|