The Pushbase SDK offers a hook to listen for incoming notifications and automatically track delivery metrics when notifications are received and opened by users.
app/_layout.tsx

import React from 'react';
import {Slot} from 'expo-router'
import {usePushbaseListeners} from '@pushbase/sdk'

// Configure how your app will handle notification
Notifications.setNotificationHandler({
  handleNotification: async () => ({
    shouldShowAlert: true,
    shouldPlaySound: true,
    shouldSetBadge: true,
  }),
});

export default function Layout() {

// Optional enable automatic deep linking
usePushbaseListeners({ enableDeepLinking: true })

return <Slot>
}

Having trouble setting up or configuring the SDK? Our support team is here to help — feel free to reach out