OptionalcachingPartition the query cache by a boolean caching flag. Two hook
instances that pass different cachingEnabled values get
separate cache slots — useful when the same campaign is fetched
with and without cache-busting query params on the underlying
fetcher. Contributes to the queryKey only; the fetcher itself
is unchanged.
OptionalenabledSkip fetching when false. Defaults to true.
OptionalinitialSeed the query with pre-fetched data — matches TanStack's
initialData. Route loaders should pass this so the first paint
shows real data instead of the loading state (no flash of
skeleton on route entry).
Typed as unknown here so one shared option shape spans every
hook. Cast at the call site if you want tighter typing:
useCampaign(params, { initialData: loaded as unknown as UseFetchOptions["initialData"] });
For useCampaigns (multi) initialData may also be an
array indexed 1:1 against params — each row is seeded with its
matching entry.
OptionalmaxCap the number of pages retained by useInfiniteQuery. Only
meaningful for useInfiniteDonations; other hooks ignore
it. TanStack Query v5 drops the oldest page when this limit is
hit — matches the overlay convention of "fetch once then poll for
new rows only".
OptionalrefetchPoll every N ms. Pass false to disable polling.
OptionalretryRetries on error. Defaults to 10 (workspace default). Pass
false (or 0) to disable retries entirely — useful for hooks
whose enabled clause depends on an id that may legitimately 404.
OptionalretryBase delay (ms) for exponential backoff. Defaults to 1000.
OptionalstaleOverride the workspace-default staleTime (5_100 ms). Pass
0 to disable freshness windows entirely (every read refetches).
Standard hook options shape. Identical to
@playlive/react-data/types#UseFetchOptions.TanStack-specific knobs (
staleTime,gcTime,suspense, etc.) are accepted as extras on each hook's options arg via intersection with TanStack'sUseQueryOptionssubset; this base shape covers only the keys both packages honour.