Skip to main content
Version: 1.x.x

useAppManager


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 available on the Builder instance.

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

const { isOnline, setOnline } = useAppManager(builder);

setOnline(true);
const { isFocused, setFocused } = useAppManager(builder);

setFocused(true);

Returns

Returned values from this hook.

const values = useAppManager(builder);

{
isFocused: boolean;
isOnline: boolean;
setFocused: (isFocused: boolean) => void;
setOnline: (isOnline: boolean) => void;
}