Skip to main content

AppManager

Class


Preview

new AppManager(builder, options)

Description

App manager handles main application states - focus and online. Those two values can answer questions:

  • Is the tab or current view instance focused and visible for user?

  • Is our application online or offline?

With the app manager it is not a problem to get the valid answer for this question.

Caution

Make sure to apply valid focus/online handlers for different environments like for example for native mobile applications.

Import

import { AppManager } from "@better-typed/hyper-fetch"

Parameters

Name Type Default Value Description
builder BuilderInstance - -
options AppManagerOptionsType - -

Methods

setOnline()

setOnline(isOnline)
Returns a void

Parameters

Name Type Default Value Description
isOnline boolean - -

setFocused()

setFocused(isFocused)
Returns a void

Parameters

Name Type Default Value Description
isFocused boolean - -

References