Skip to content
On this page

applyIncrementalUpdate()

Generate a new bundle and replace the original one with it.

Arguments

NameRequiredTypeDefault ValueNote
immediateNObooleanfalseReload the App after the bundle is replaced.

Returns

typescript
Promise<boolean>;

Example

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

const manager = registerUpdateManager();

const updateBundle = async () => {
  if (await manager.checkForUpdate()) {
    await manager.requestIncrementalUpdates();

    await manager.applyIncrementalUpdate(true);
  } else {
    Alert.alert("No need to update.");
  }
};

await updateBundle();

Released under the MIT License.