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-native";
Usage
Call the useUser hook to get the information about the currently signed in wallet.
import { useUser } from "@thirdweb-dev/react-native";
function App() {
const { user, isLoggedIn, isLoading } = useUser();
}
Return Value
{
user: {
address: string;
session?: Json;
} | undefined;
isLoggedIn: boolean;
isLoading: boolean;
}