useAccount hook returns the current user’s account information including their connection status, user ID, and linked auth methods.
Hook for retrieving the current user’s account and connection status
useAccount hook returns the current user’s account information including their connection status, user ID, and linked auth methods.
import { useAccount } from "@getpara/react-native-wallet";
import { useAccount } from "@getpara/react-native-wallet";
import { View, Text } from "react-native";
function AccountStatus() {
const account = useAccount();
return (
<View>
<Text>Status: {account.isConnected ? "Connected" : "Not connected"}</Text>
{account.userId && <Text>User ID: {account.userId}</Text>}
</View>
);
}