Returns a stateful asynchronous logout function.
The Promise will resolve after successful logout.
Promise
The Promise will reject otherwise.
function LogoutButtonExample(){ const logout = useLogout(); // logout.loading is true once the logout function is called. // It resets to false after the function resolves or rejects. console.log(logout.loading); return <button disabled={login.loading} onClick={() => logout()} > log out </button>;}
Stateful asynchronous logout function.
Optional logout URL.
Generated using TypeDoc
Returns a stateful asynchronous logout function.
The
Promise
will resolve after successful logout.The
Promise
will reject otherwise.Example
Returns
Stateful asynchronous logout function.