- useUser<TData, TContext>(): {
isLoading: boolean;
isLoggedIn: boolean;
user: UserWithData<TData, TContext> | undefined;
}
Beta
Type Parameters
-
TData extends Json = Json
-
TContext extends Json = Json
Returns {
isLoading: boolean;
isLoggedIn: boolean;
user: UserWithData<TData, TContext> | undefined;
}
- The currently logged in user or null if not logged in, as well as a loading state.
-
isLoading: boolean
-
isLoggedIn: boolean
-
user: UserWithData<TData, TContext> | undefined
Hook to get the currently logged in user.