Skip to main content

Overview

useFetchManyEvents returns a callable that fetches a single page of events with all filters, sorting, geo, and free-text search. Visibility is enforced server-side. This is the low-level query — for a stateful list with sort state and load-more, use useFetchManyEventsWrapper.

Usage Example

Parameters

number
Page number (1-indexed). Defaults to 1.
number
Results per page. Capped at 100.
"startTime" | "going"
Sort field. Defaults to "startTime".
"asc" | "desc"
Sort direction. Defaults to "asc".
"upcoming" | "ongoing" | "past"
Derived time window.
string
ISO datetime lower bound on startTime.
string
ISO datetime upper bound on startTime.
string
Restrict to one space.
string
Only events this user hosts.
"online" | "physical" | "hybrid"
Filter by type.
"active" | "cancelled"
Defaults to "active".
RsvpStatus | RsvpStatus[]
Statuses the logged-in user RSVP’d with, e.g. ["going","maybe"].
{ latitude; longitude; radius }
Proximity filter (radius in meters).
{ hasTitle?; includes?; doesNotInclude? }
Free-text filter on title.
{ hasDescription?; includes?; doesNotInclude? }
Free-text filter on description.
string | string[]
Associations to expand.

Returns

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

See Also