mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
26 lines
711 B
Plaintext
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)
|