Skip to main content

useLogout

Hook for signing out of a wallet after a user has logged in using auth.

import { useLogout } from "@thirdweb-dev/react-native";

Usage

Call the logout function to have the user sign out.

The isLoading boolean can be used to display a loading state on the UI while the user is signing out.

import { useLogout } from "@thirdweb-dev/react-native";

function App() {
const { logout, isLoading } = useLogout();

return (
<Button
title={isLoading ? "Logging out..." : "Logout"}
onPress={() => logout()}
/>
);
}