---
title: "React Native PDF events | Nutrient React Native SDK"
canonical_url: "https://www.nutrient.io/guides/react-native/events-and-notifications/events/"
md_url: "https://www.nutrient.io/guides/react-native/events-and-notifications/events.md"
last_updated: "2026-05-26T12:37:25.519Z"
description: "Discover key events in Nutrient React Native SDK, including document saving, loading failures, and user interactions with annotations."
---

# PDF viewer events

Nutrient React Native SDK lets you listen to various events that occur when the end user interacts with Nutrient.

The following table lists the events supported by Nutrient React Native SDK on the main namespace:

| **Event**                                    | **Description**                                                    |
| -------------------------------------------- | ------------------------------------------------------------------ |
| `onCloseButtonPressed`                       | Called when the [close button](https://www.nutrient.io/guides/react-native/user-interface/close-button.md) is pressed.                       |
| `onStateChanged`                             | Called when the [`NutrientView`](https://www.nutrient.io/api/react-native/NutrientView.html)'s state changed.                |
| `onDocumentLoaded`                           | Called when the document has been successfully loaded.             |
| `onDocumentSaved`                            | Called when the document has been successfully saved.              |
| `onDocumentSaveFailed`                       | Called when the document failed to save.                           |
| `onDocumentLoadFailed`                       | Called when the document failed to load.                           |
| `onAnnotationTapped`                         | Called when the end user tapped on an annotation.                  |
| `onAnnotationsChanged`                       | Called when one or more annotations have changed.                  |
| `onNavigationButtonClicked`                  | Called when the [navigation back button](https://www.nutrient.io/guides/react-native/user-interface/close-button.md) is pressed. |
| `onCustomAnnotationContextualMenuItemTapped` | Called when a custom [contextual menu item](https://www.nutrient.io/guides/react-native/user-interface/menus.md) button is pressed.   |
| `onCustomToolbarButtonTapped`                | Called when a custom [toolbar button](https://www.nutrient.io/guides/react-native/user-interface/toolbars/main-toolbar.md) is pressed.                |

These events are superceded by the Nutrient React Native [`NotificationCenter`](/api/react-native/NotificationCenter.html).

## Implementing an event listener

The example below shows how to implement an event listener to be notified when a document is saved:

```js

<NutrientView
	document={DOCUMENT}
	onDocumentSaved={(event) => {
		if (event['error']) {
			alert(event['error']);
		} else {
			alert('Document Saved!');
		}
	}}
	ref={this.pdfRef}
	fragmentTag="PDF1"
	style={{ flex: 1 }}
/>

```

For more details and sample code, see the [`EventListeners.tsx` example](https://github.com/PSPDFKit/react-native/tree/master/samples/Catalog/examples/EventListeners.tsx) from the [Catalog example project](https://www.nutrient.io/guides/react-native/prebuilt-solutions/example-projects.md#pspdfkit-catalog).
---

## Related pages

- [Analytics events](/guides/react-native/events-and-notifications/analytics.md)
- [Annotation events and notifications](/guides/react-native/events-and-notifications/annotation.md)
- [Viewer events](/guides/react-native/events-and-notifications/viewer.md)
- [PDF form events and notifications](/guides/react-native/events-and-notifications/forms.md)
- [Events and notifications](/guides/react-native/events-and-notifications.md)

