couch-kit
    Preparing search index...

    Function usePreload

    • Preloads a list of asset URLs (images via Image(), others via fetch()).

      Returns loaded (all done), progress (0-100), and failedAssets (URLs that failed to load). Failed assets still count toward progress so the hook always reaches 100 % — check failedAssets.length to decide how to react.

      Parameters

      • assets: string[]
      • OptionalsendMessage: (msg: { payload: unknown; type: string }) => void

      Returns PreloadResult