This is a reference for the useStackApp
hook in the React SDK.
The useStackApp
hook returns a StackClientApp
object from the one that you provided in the StackProvider
component. If you want to learn more about the StackClientApp
object, check out the StackApp documentation.
Example:
import { useStackApp } from '@stackframe/stack';
function MyComponent() {
const stackApp = useStackApp();
return <div>Sign In URL: {stackApp.urls.signIn}</div>;
}
Usage
import { useStackApp } from '@neondatabase/neon-auth-{sdkSlug}';
function MyComponent() {
const stackApp = useStackApp();
// ...
}
Returns
StackClientApp
: The main client-side SDK object.