Preparing search index...

    Module hooks/useVisibleImageLoader

    useVisibleImageLoader - Hook for visibility-based image URL loading

    Fetches image URLs only for recipes that are visible or near-visible in the viewport, dramatically reducing network requests for large recipe lists. Uses debouncing to prevent fetch spam during fast scrolling and supports fetch cancellation.

    Key Features:

    • Only fetches image URLs for visible/near-visible items
    • Debounces visibility changes to avoid fetch spam
    • Cancels in-flight fetches for items that leave viewport
    • Limits concurrent fetches to prevent memory exhaustion
    • Tracks fetched URLs to avoid duplicate requests

    Interfaces

    UseVisibleImageLoaderOptions
    UseVisibleImageLoaderReturn

    Functions

    useVisibleImageLoader