interface UseFeedCacheResult

Returned by useFeedCache to a feed page.

Type Parameters

Properties

cached: Omit<FeedCacheEntry<T>, "savedAt"> | null

It holds the saved feed when the page was reached by going back or forward and the feed was saved less than 10 minutes ago. It changes only with the key.

saveState: (
list: SavedList<T>,
scrollY: number
) => void

Usually called through useScrollSave, as the page is left.

Usage

import { type UseFeedCacheResult } from "src/hooks/feed/useFeedCache.ts";