hooks/useSCFetchFeed
Interfaces
SCPaginatedFeedType
Interface SCPaginatedFeedType
Properties
| Property | Type |
|---|---|
componentLoaded | boolean |
count | number |
currentOffset | number |
currentPage | number |
isLoadingNext | boolean |
isLoadingPrevious | boolean |
next | string |
previous | string |
reload | boolean |
results | SCFeedUnitType[] |
Functions
useSCFetchFeed()
useSCFetchFeed(
props):any
info
This custom hooks is used to fetch paginated Data.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | { cacheStrategy: CacheStrategies; endpoint: EndpointType; endpointQueryParams: Record<string, string | number>; id: string; onNextPage: (page, offset, total, data) => any; onPreviousPage: (page, offset, total, data) => any; prefetchedData: SCPaginatedResponse<SCFeedUnitType>; } | |
props.cacheStrategy? | CacheStrategies | - |
props.endpoint | EndpointType | - |
props.endpointQueryParams? | Record<string, string | number> | - |
props.id | string | - |
props.onNextPage? | (page, offset, total, data) => any | - |
props.onPreviousPage? | (page, offset, total, data) => any | - |
props.prefetchedData? | SCPaginatedResponse<SCFeedUnitType> | - |
Returns
any