Skip to main content

useBatchAddListener

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useBatchAddListener = BatchCancellableEventHook;
note

Event Hook - BATCH-ADD

Called when a new batch is added.

info

This event is cancellable

Example​

    import { useBatchAddListener } from "@rpldy/uploady";

const MyComponent = () => {
useBatchAddListener((batch) => {
console.log(`batch ${batch.id} was just added with ${batch.items.length} items`);
});

//...
};