Skip to main content

useItemCancelListener

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useItemCancelListener = ItemEventHook;
note

Event Hook - ITEM-CANCEL

Called in case item was cancelled from ITEM_START event handler

info

This event can be scoped to a specific item by passing the item id as a second parameter

Example​

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

const MyComponent = () => {
useItemCancelListener((item) => {
console.log(`item ${item.id} was cancelled`);
});

//...
};