Skip to main content

Logout Button

Simple and secure logout component that handles user session termination with proper error handling and callback support.

Quick Example

import { LogoutButton } from "@ovok/native";
import React from "react";

const LogoutExample = () => {
return <LogoutButton />;
};

export default LogoutExample;

Props

PropTypeRequiredDefaultDescription
titlestring-"settings.logout" translationCustom button title
onSuccess() => void--Called when logout succeeds
onError(error: Error) => void--Called when logout fails
onPress() => void--Called before logout (optional)

Inherits all SettingListItemProps except title which becomes optional

Localization

The component uses this translation key:

{
"settings": {
"logout": "Logout"
}
}
  • settings.logout - Default button title text