Skip to main content

hooks/useSCFetchFeed

Interfaces

SCPaginatedFeedType

Interface SCPaginatedFeedType

Properties

PropertyType
componentLoadedboolean
countnumber
currentOffsetnumber
currentPagenumber
isLoadingNextboolean
isLoadingPreviousboolean
nextstring
previousstring
reloadboolean
resultsSCFeedUnitType[]

Functions

useSCFetchFeed()

useSCFetchFeed(props): any

info

This custom hooks is used to fetch paginated Data.

Parameters

ParameterTypeDescription
propsobject
props.cacheStrategy?CacheStrategies-
props.endpointEndpointType-
props.endpointQueryParams?Record<string, string | number>-
props.idstring-
props.onNextPage?(page, offset, total, data) => any-
props.onPreviousPage?(page, offset, total, data) => any-
props.prefetchedData?SCPaginatedResponse<SCFeedUnitType>-

Returns

any

Source

packages/react-core/src/hooks/useSCFetchFeed.ts:172