useItemFinalizeListener
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @rpldy/uploady
Detailsβ
type useItemFinalizeListener = ItemEventHook;
- See: ItemEventHook
- See: BatchItem Entity
note
Event Hook - ITEM-FINALIZE
Called for item when uploading is done due to: finished, error, cancel or abort
info
This event can be scoped to a specific item by passing the item id as a second parameter
Exampleβ
import { useItemFinalizeListener } from "@rpldy/uploady";
const MyComponent = () => {
useItemFinalizeListener((item, options) => {
console.log(`item ${item.id} is done with state: ${item.state}`);
});
//...
};