Toggle
API Reference
useFetcher
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
endpoint | String | Yes | The API endpoint to fetch data from. |
firstFilter | String | No | An optional filter to include in the API query. |
secondFilter | String | No | Another optional filter to include in the API query. |
thirdFilter | String | No | An optional third filter to include in the API query. |
limit | Number | No | Number of items to fetch per request (default: 5). |
Returns:
Return Value | Type | Description |
---|---|---|
datas | Array | The fetched data. |
loading | Boolean | Indicates if the data is currently being loaded. |
hasMore | Boolean | Indicates if there is more data to fetch. |
next | Function | Function to fetch the next set of data. |
InfiniteScroll
Prop | Type | Required |
---|---|---|
hasMore | Boolean | Yes |
isLoading | Boolean | Yes |
next | Function | Yes |
threshold | Number | Yes |