A simple job queue with a React component interface.
const BufferedWork = ({ doWork }) => (
<Queue>
{(enqueue, processAll) => (
<button onClick={() => enqueue(doWork)}>
Enqueue work
</button>
<button onClick={() => processAll()}>
Process all
</button>
)}
</Queue>
);
yarn add @davidisaaclee/react-queue
# Clone repository.
git clone https://github.com/davidisaaclee/react-queue
cd react-queue
# Build for ES modules, CommonJS, and UMD.
yarn build
# Run tests.
yarn test