MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / _batchUpdate

Function _batchUpdate

packages/core/ui/core/view-base/index.ts:787–795  ·  view source on GitHub ↗

* Allow multiple updates to be performed on the instance at once.

(callback: () => T)

Source from the content-addressed store, hash-verified

785 * Allow multiple updates to be performed on the instance at once.
786 */
787 public _batchUpdate<T>(callback: () => T): T {
788 try {
789 this._suspendNativeUpdates(SuspendType.Incremental);
790
791 return callback();
792 } finally {
793 this._resumeNativeUpdates(SuspendType.Incremental);
794 }
795 }
796
797 private setFlag(flag: Flags, value: boolean): void {
798 switch (flag) {

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected