---
title: "Detect if PDF annotation has changed in React Native | Nutrient"
canonical_url: "https://www.nutrient.io/guides/react-native/annotations/create-edit-and-remove/detect-changes/"
md_url: "https://www.nutrient.io/guides/react-native/annotations/create-edit-and-remove/detect-changes.md"
last_updated: "2026-05-30T02:20:01.349Z"
description: "Discover how to effectively manage annotations in React Native apps with our comprehensive guide. Improve your app's functionality and user experience."
---

# Detecting if annotations have changed in React Native

Nutrient React Native SDK lets you detect when one or more annotations have changed via the `AnnotationEvent` event listeners. Here’s how to register for the event listeners to be notified when one or more annotations have changed:

```js

override componentDidMount() {
    this.pdfRef.current?.getNotificationCenter().subscribe(NotificationCenter.AnnotationsEvent.CHANGED, (event: any) => {
      Alert.alert('Nutrient', JSON.stringify(event));
    });

    this.pdfRef.current?.getNotificationCenter().subscribe(NotificationCenter.AnnotationsEvent.ADDED, (event: any) => {
      Alert.alert('Nutrient', JSON.stringify(event));
    });

    this.pdfRef.current?.getNotificationCenter().subscribe(NotificationCenter.AnnotationsEvent.REMOVED, (event: any) => {
      Alert.alert('Nutrient', JSON.stringify(event));
    });
  }

```

When done, remember to unregister from the event listeners:

```js

override componentWillUnmount () {
	this.pdfRef.current?.getNotificationCenter().unsubscribe(NotificationCenter.AnnotationsEvent.CHANGED);
	this.pdfRef.current?.getNotificationCenter().unsubscribe(NotificationCenter.AnnotationsEvent.ADDED);
	this.pdfRef.current?.getNotificationCenter().unsubscribe(NotificationCenter.AnnotationsEvent.REMOVED);
}

```

---

## Related pages

- [Set annotation author in React Native](/guides/react-native/annotations/create-edit-and-remove/author-name.md)
- [Define annotation behavior with flags on React Native](/guides/react-native/annotations/create-edit-and-remove/annotation-flags.md)
- [Disable annotation editing in React Native](/guides/react-native/annotations/create-edit-and-remove/disable-editing.md)
- [Programmatically create annotations in React Native](/guides/react-native/annotations/create-edit-and-remove/programmatic.md)
- [Programmatically select or deselect annotations in React Native](/guides/react-native/annotations/create-edit-and-remove/selection-deselection.md)

