function useFading
useFading(onFaded?: (id: string) => void): UseFadingResult

Returns the fading state of a list's items and the calls that drive it. onFaded is called with an item whose fade ran to its end, for the list to drop it; a cancelled fade doesn't call it. The timers are cleared on unmount.

Parameters

optional
onFaded: (id: string) => void

Return Type

Usage

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