useQueue

React state hook implements simple FIFO queue.

hooks
Description of the SVG image Loading...

Variants

with useHooks

Description of the SVG image Loading...

The useQueue hook is a useful tool for managing a queue of elements within a functional component. It allows you to easily add, remove, and clear elements from the queue while maintaining the necessary state updates. The hook returns an object that includes the functions for manipulating the queue (add, remove, and clear), as well as additional properties such as first, last, size, and queue.

Installation

Run the following command:

npx ever-ui-clx@0.2.1 add demo-use-queue
# └──> Hook coming soon.

Usage