UNPKG

@nhost/react

Version:

Nhost React library

29 lines 804 B
/** * Use the hook `useSignOut` to sign out the user. * * @example * ```tsx * import { useSignOut, useAuthenticated } from '@nhost/react' * * const Component = () => { * const { signOut } = useSignOut() * const isAuthenticated = useAuthenticated() * * if (isAuthenticated) { * return ( * <button onClick={() => signOut()}>Sign Out</button> * ) * } * * return <div>Not authenticated</div> * } * ``` * * @docs https://docs.nhost.io/reference/react/use-sign-out */ export declare const useSignOut: (stateAll?: boolean) => { signOut: (valueAll?: boolean | unknown) => Promise<import('@nhost/nhost-js').SignOutlessHandlerResult>; isSuccess: boolean; error: import('@nhost/nhost-js').AuthErrorPayload | null; }; //# sourceMappingURL=useSignOut.d.ts.map