---
sidebar_position: 7
title: React hooks - useAppManager
sidebar_label: useAppManager
---

# useAppManager

<div class="api-link">
  <div class="api-link-title">useAppManager</div>
  <div class="api-link-sub-title">

[Read the API Reference »](/api/React/Hook/useAppManager.mdx)

  </div>
</div>

---

## Introduction

**`useAppManager`** allows you to use information about the connection status and screen focus state. It also offers
options to manipulate its global state. This hook uses the [`AppManager`](/documentation/02-core/managers.mdx) available
on the [`Client`](/documentation/02-core/client.mdx) instance.

It returns the status of `isOnline` and `isFocused` and the actions that allow you to change them.

```tsx
const { isOnline, setOnline } = useAppManager(client);

setOnline(true);
```

```tsx
const { isFocused, setFocused } = useAppManager(client);

setFocused(true);
```

---

## Returns

Returned values from this hook.

```tsx
const values = useAppManager(client);
```

{@import React useAppManager returns}
