Logging Out
Overview
The logout
function logs out the user from the application.
How to Use
Destructure the function from the hook:
const { logout } = useJustAuth();
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