@Computed Decorator: Declaring Computed Properties When developers repeatedly bind the same calculation logic to the UI, to prevent redundant calculations, the @Computed property can be used. A comput
阅读全文
openharmony 鸿蒙 arkts-custom-components-new-lifecycle
Lifecycle of a Custom Component (Recommended) Overview The existing custom component lifecycle callback function is triggered only by events. In some specific cases, the triggering sequence of the cus
阅读全文
openharmony 鸿蒙 arkts-new-addMonitor-clearMonitor
addMonitor and clearMonitor APIs: Dynamically Adding and Removing Listeners The addMonitor and clearMonitor APIs enable you to dynamically add or remove listeners for state variables in state manageme
阅读全文
openharmony 鸿蒙 arkts-component-freeze-inactive
Custom Component Freezing Custom component freezing is available in two versions: V1 custom component freezing V2 custom component freezing
阅读全文
openharmony 鸿蒙 arkts-mutableBuilder
mutableBuilder: Implementing Dynamic Update of Global @Builder When multiple global @Builder functions are used within a single custom component to achieve different UI effects, code maintenance becom
阅读全文
openharmony 鸿蒙 arkts-new-applySync-flushUpdates-flushUIUpdates
applySync/flushUpdates/flushUIUpdates APIs: Synchronous Update To synchronize the update of state management V2 and animation effects such as animateTo, you can use the applySync, flushUpdates, or flu
阅读全文
openharmony 鸿蒙 arkts-v1-v2-migration-inner-object
Migration for Built-in Objects This document describes how to migrate built-in objects in a component from V1 to V2, involving the following decorators. V1 Decorator/ScenarioV2 Decorator Scrollable co
阅读全文
openharmony 鸿蒙 arkts-state-management-faq-application-and-others
In-App State Management and Other FAQs This section describes the common problems of in-app state management and other common problems. Errors Caused by Using ArkUI Decorators in Concurrent Threads La
阅读全文
openharmony 鸿蒙 troubleshooting-state-manage
Common Methods for Locating the Problem That Component Refresh Is Not Triggered When State Variables Change In the declarative UI programming framework, the main responsibility of state management is
阅读全文
openharmony 鸿蒙 arkts-v1-v2-migration-application-and-others
Migration for In-Application State Variables and Related Scenarios This guide provides migration instructions for in-application state variables and their related usage scenarios. V1 Decorator Name/Sc
阅读全文