This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/react-native/events-and-notifications/annotation.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. React Native PDF annotation events & notifications | Nutrient React Native SDK

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:

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:

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);
}