stack/docs-mintlify/sdk/hooks/use-stack-app.mdx
2026-04-06 17:21:49 -07:00

26 lines
711 B
Plaintext

---
title: "useStackApp"
description: "React hook to retrieve the StackClientApp instance from the StackProvider."
sidebarTitle: "useStackApp"
icon: "react"
mode: "wide"
---
The `useStackApp` hook returns a `StackClientApp` object from the one that you provided in the setup flow. If you want to learn more about the `StackClientApp` object, check out the [StackApp](/sdk/objects/stack-app) documentation.
## Usage
```jsx
import { useStackApp } from "@stackframe/stack";
function MyComponent() {
const stackApp = useStackApp();
return <div>Sign In URL: {stackApp.urls.signIn}</div>;
}
```
## Related
- [Setup guide](/guides/getting-started/setup)
- [StackApp object reference](/sdk/objects/stack-app)