useAbortBatch
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @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>
};