Logging Out

Overview

The logout function logs out the user from the application.

How to Use

  1. Destructure the function from the hook:

    const { logout } = useJustAuth();
  2. Call the function on a button click:

    <button onClick={logout}>Logout</button>

Parameters

  • No parameters are required for this function.

Example

const { logout } = useJustAuth();

<button onClick={logout}>Logout</button>

Last updated