EventProvider loads one event and exposes it — plus bound actions — to descendants via useEvent. It’s the simplest way to build an event detail page: the provider fetches the event (or accepts a pre-fetched one), and useEvent gives you the event state and callbacks that keep it in sync.
There is no Redux store behind this — state is local to the provider. For lists, use useFetchManyEventsWrapper instead.
EventProvider
Identify the event byeventId, or pass a pre-fetched event object to skip the initial fetch.
Props
Associations to expand on the fetch, e.g.
"user,files,userRsvp". Only used with eventId.EventProvider renders null if neither eventId nor a valid event is provided.useEvent
CalluseEvent inside a descendant of EventProvider.
Return Values
The loaded event.
undefined while loading, null if not found or inaccessible.Directly set the event state. Useful for optimistic local updates.
Update the event’s mutable fields. Host-only. Updates local state on success.
Set/change the caller’s RSVP (
"going" | "maybe" | "not_going"). Capacity-checked for going.These bound actions wrap the standalone hooks and handle errors internally
(logging and returning
undefined). For host/invite management
(useAddHost, useAddInvite, …) and guest-list reads, use the standalone
hooks alongside the provider.
