useUploady
Packageβ
Installationβ
- npm
- Yarn
- pnpm
npm install @rpldy/uploady
yarn add @rpldy/uploady
pnpm add @rpldy/uploady
Detailsβ
type useUploady: () => UploadyContextType;
Shortcut hook to get the Uploady Context instance
info
alias for useUploadyContext
warning
Will throw in case used outside of Uploady render tree
Exampleβ
import { useUploady } from "@rpldy/uploady";
const MyComponent = () => {
const uploady = useUploady();
const onClick = () => {
uploady.showFileUpload();
}
//...
};
const App = () => (
<Uploady destination={{ ... }}>
<MyComponent/>
</Uploady>
);