A lightweight job-based asynchronous queue hook for React 16.8+ and React Native. v0.5.0 is the current stable release; no regular cadence. Key differentiator: minimal API—add tasks or promises, get a callback on completion. Lacks built-in WebWorker support and automated tests. No dependencies besides React peer dependency.
npm install react-use-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: import the hook, create a queue, add tasks (sync and async), and listen for completion.
Ensure 'addJob' argument is either { task: () => ... } or a function directly, per v0.5.0 API.Use 'import useQueue from ...' not 'import { useQueue } from ...' or 'require("react-use-queue").useQueue'.Consider wrapping calls or add explicit types as needed.
If parallel execution is needed, implement custom queue or use alternative library.
Replace 'import { useQueue } from "react-use-queue"' with 'import useQueue from "react-use-queue"'.Ensure React 16.8+, and use 'const Queue = useQueue();' then 'Queue.addJob(...)'.
Run 'npm i react-use-queue' and restart dev server.
Only call useQueue from a React component or custom hook (see Rules of Hooks).
No dependency data recorded yet.