UseQueueReturnType
Import
import { UseQueueReturnType } from "@hyper-fetch/react"
Source
Package
Preview
type UseQueueReturnType<T> = {
dispatcher: Dispatcher<ExtractAdapterType<T>>;
pause: () => void;
requests: QueueRequest<T>[];
start: () => void;
stop: () => void;
stopped: boolean;
}
Structure
UseQueueReturnType
| Name | Type | Description |
|---|---|---|
| dispatcher | | Request dispatcher instance |
| requests | | List of requests for provided request |
| stopped | | Queue status for provided request |
| pause | | Callback which allow to pause queue. It will allow ongoing requests to be finished, but will stop next from being send. |
| start | | Callback which allow to start queue. |
| stop | | Callback which allow to stop queue, it will cancel ongoing requests. |