> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# onDataUpdated

APISummary
数据更新时调用，但视图可能尚未更新。

## 语法

### Android

```java
public void onDataUpdated();
```

### iOS

```objc
- (void)lynxViewDidUpdate:(LynxView *)view;
```

#### 参数

- `view`: LynxView 实例。

### Harmony

```typescript
public onDataUpdated(): void;
```

### Desktop (C++)

```cpp
class YourViewClient : public lynx::pub::LynxViewClient {
 public:
  void OnDataUpdated() override;
};
```

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.lynx-view-client.on-data-updated`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-view-client/on-data-updated.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| on-data-updated | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (3.7) | Yes (3.7) | No |

**`on-data-updated`**

Called when data update, but the view may not be updated.

**Specifications:**

