useUser

Hook for retrieving information about the currently signed-in user using auth .

Useful to get the user's address and session data, or undefined if no user is signed in.

import { useUser } from "@thirdweb-dev/react";
function App() {
const { user, isLoggedIn, isLoading } = useUser();
}
function useUser(): {
isLoading: boolean;
isLoggedIn: boolean;
user: undefined | UserWithData<TData, TContext>;
};

Returns

let returnType: {
isLoading: boolean;
isLoggedIn: boolean;
user: undefined | UserWithData<TData, TContext>;
};