> For the complete documentation index, see [llms.txt](https://aleo-hooks.gitbook.io/aleo-hooks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aleo-hooks.gitbook.io/aleo-hooks/usedisconnect.md).

# useDisconnect

Use this hook to disconnect current Aleo wallet

```tsx
import { FC } from 'react'
import { useDisconnect } from 'aleo-hooks'

export const UseDisconnect: FC = () => {
    const { disconnect, disconnecting, error } = useDisconnect()

    const disconnectHandler = () => disconnect()

    return (
        <div>
            {error && <p>Something went wrong {JSON.stringify(error)}</p>}
            <button disabled={disconnecting} onClick={disconnectHandler}>disconnect</button>
        </div>
    )
}
```
