lumilio-web / contexts/FetchContext / AssetsState
Interface: AssetsState
Defined in: contexts/FetchContext.tsx:71
Assets State Interface
Defines the complete state structure for asset browsing operations. This state is read-only and optimized for performance.
AssetsState
Since
1.0.0
Example
function AssetCounter() {
const { assets, isLoading, hasMore } = useAssetsContext();
return (
<div>
<p>Loaded {assets.length} assets</p>
{isLoading && <p>Loading...</p>}
{!hasMore && <p>All assets loaded</p>}
</div>
);
}
Properties
assets
assets:
Asset
[]
Defined in: contexts/FetchContext.tsx:76
Array of currently loaded assets. This list grows as more pages are fetched via infinite scrolling.
error
error:
null
|string
Defined in: contexts/FetchContext.tsx:86
filters
filters:
ListAssetsParams
Defined in: contexts/FetchContext.tsx:83
Current filter and search parameters applied to the asset list.
See
ListAssetsParams for available filter options
hasMore
hasMore:
boolean
Defined in: contexts/FetchContext.tsx:87
isLoading
isLoading:
boolean
Defined in: contexts/FetchContext.tsx:84
isLoadingNextPage
isLoadingNextPage:
boolean
Defined in: contexts/FetchContext.tsx:85