Notifications
The notification feed is flat: new-follower and reaction-on-your-post events only, in
one reverse-chronological list. There is no aggregation (“5 people liked your post”
grouping) — each event is its own row, with independent seen_at/read_at timestamps
and running unseen/unread counts. DropInServer has no notifications API — these
are always read as the authenticated user via the client SDK, so no server tab appears
on this page.
Read notifications
Section titled “Read notifications”// NotificationPage: { results, unseen, unread, next }const page = await client.notifications.get({ limit: 20 })page.results // Notification[]page.unseen // count of not-yet-seen notificationspage.unread // count of not-yet-read notificationsimport { useNotifications } from '@dropin/react'
function Bell() { const { notifications, unseen, unread, isLoading, loadNext, hasNext } = useNotifications() return <span>{unseen} new</span>}Mark seen
Section titled “Mark seen”Pass specific ids, or omit/pass an empty array to mark every notification seen.
await client.notifications.markSeen(['notif_1', 'notif_2']) // specific idsawait client.notifications.markSeen() // mark allconst { markSeen } = useNotifications()await markSeen() // optimistically zeroes `unseen`, rolls back on errorMark read
Section titled “Mark read”Same id-list-or-all contract as markSeen.
await client.notifications.markRead(['notif_1'])await client.notifications.markRead() // mark allconst { markRead } = useNotifications()await markRead()Read unseen/unread counts
Section titled “Read unseen/unread counts”Counts come back on every notifications.get() response, and are kept live by
useNotifications (updated by refresh(), and optimistically by markSeen/markRead).
Pass pollInterval (ms) to useNotifications({ pollInterval: 15000 }) to refresh on a
timer.
const page = await client.notifications.get()page.unseenpage.unreadconst { unseen, unread } = useNotifications({ pollInterval: 15000 })