Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/NotificationsExampleApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function NotificationsExampleApp() {
const getInitialNotifaction = async () => {
const initialNotification = await Notifications.getInitialNotification();
if (initialNotification) {
setNotifications([initialNotification, ...notifications]);
setOpenedNotifications([initialNotification, ...openedNotifications]);
}
}

Expand Down
1 change: 1 addition & 0 deletions website/docs/api/general-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ To receive background notifications on iOS follow [this guide](https://developer
## registerNotificationOpened()
Fired when a remote notification is opened from dead or background state. The handler will be invoked with an instance of [Notification](notification-obj).
Should call completion function on iOS, will be ignored on Android.
Being called before component is mounted, if you want to know the initial notification in the component please use [getInitialNotification](general-api#getInitialNotification) on mount.

```js
Notifications.events().registerNotificationOpened((notification: Notification, completion: () => void) => {
Expand Down