interface UseFadingResult

Returned by useFading to useUpvotedList and usePlaylist. The list keeps showing an item while it is in fading.

Properties

fading: Record<string, FadeState>
startFading: (id: string) => void

Does nothing when id is already fading.

cancelFading: (id: string) => void

Called when the removal is undone, so that the item stays.

cancelAll: () => void

Called when the list is replaced, as by another user's upvotes.

Usage

import { type UseFadingResult } from "src/hooks/feed/useFading.ts";