Skip to main content
Version: v8.0.0

AppManagerOptionsType


Import
import { AppManagerOptionsType } from "@hyper-fetch/core"

Preview​

type AppManagerOptionsType = {
focusEvent?: (setFocused: (isFocused: boolean) => void) => void | VoidFunction;
initiallyFocused?: boolean | () => boolean | Promise<boolean>;
initiallyOnline?: boolean | () => boolean | Promise<boolean>;
onlineEvent?: (setOnline: (isOnline: boolean) => void) => void | VoidFunction;
}

Structure​

AppManagerOptionsType
NameTypeDescription
initiallyFocused
boolean | () => boolean | Promise<boolean>
initiallyOnline
boolean | () => boolean | Promise<boolean>
focusEvent
(setFocused: (isFocused: boolean) => void) => void | VoidFunction

Subscribes to the environment focus changes. Return a cleanup function to let unmount() remove the listeners.

onlineEvent
(setOnline: (isOnline: boolean) => void) => void | VoidFunction

Subscribes to the environment network changes. Return a cleanup function to let unmount() remove the listeners.