Skip to main content

useAbortBatch

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useAbortBatch = () => (batchId: string) => boolean;

Returns abort batch method. This is a convenience method to use instead of using the Context API directly.

Example​

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

const MyComponent = () => {
const abortBatch = useAbortBatch();

return <button onClick={() => abortBatch("b-123")}>Abort Batch</button>
};