rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
18 lines • 515 B
TypeScript
/**
* useQueueState
* Manages a queue with react hooks.
* @param initialList Initial value of the list
* @returns The list and controls to modify the queue
* @see https://react-hooks.org/docs/useQueueState
*/
declare function useQueueState<T>(initialList: T[]): [
T[],
{
dequeue: () => T | undefined;
enqueue: (item: T) => number;
length: number;
peek: () => T | undefined;
}
];
export { useQueueState };
//# sourceMappingURL=useQueueState.d.ts.map