Skip to main content

Overview

useFetchEventRsvps returns a callable that fetches the paginated named RSVP (guest) list. Each item is an EventRsvp with the user populated. The named list is visible to hosts always, and to any viewer when the event’s guestListVisible is true (otherwise 403). Aggregate counts are always available on the event’s rsvpCounts.

Usage Example

import { useFetchEventRsvps } from "@sublay/react-js";

function useGuestList(eventId: string) {
  const fetchEventRsvps = useFetchEventRsvps();
  return () => fetchEventRsvps({ eventId, status: "going,maybe", page: 1, limit: 20 });
}

Parameters

eventId
string
required
The event ID.
status
string
Comma-separated statuses to filter by, e.g. "going,maybe". Omit for all.
page
number
Page number (1-indexed). Defaults to 1.
limit
number
Results per page. Capped at 100.

Returns

Returns a Promise<PaginatedResponse<EventRsvp>>{ data, pagination }.

See Also