Skip to content
On this page

checkForUpdate()

Fetch versions.json from remote to check whether an update is available.

INFO

The response will be cached by defualt. If you don't want to cache the resposne, call clearCache() first.

Arguments

None

Returns

typescript
Promise<boolean>;

Example

typescript
import { getUpdateManager } from "@herina-rn/client";

const manager = getUpdateManager();

const isUpdateAvailable = async () => {
  return manager.checkForUpdate();
};

await isUpdateAvailable();

Released under the MIT License.