useAbortItem
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @rpldy/uploady
Detailsβ
type useAbortItem = () => (itemId: string) => boolean;
Returns abort item method. This is a convenience method to use instead of using the Context API directly.
Exampleβ
import { useAbortItem } from "@rpldy/uploady";
const MyComponent = () => {
const abortItem = useAbortItem();
return <button onClick={() => abortItem("i-123")}>Abort Item</button>
};