interface FetchStateOptions

Passed to useFetchState.

Type Parameters

Properties

optional
enabled: boolean

False until it should load, as the profile's tabs pass "this tab is open". Turning it off doesn't abort a load under way, so those tabs finish loading in the background. True by default.

optional
initial: T

It holds the data already at hand for a new key, as a feed restored from useFeedCache, which starts loaded and isn't loaded again. It is read only when the key changes.

Usage

import { type FetchStateOptions } from "src/hooks/shared/useFetchState.ts";