Skip to main content

useUploady

Package​

@rpldy/uploady

Installation​

npm install @rpldy/uploady

Details​

type useUploady: () => UploadyContextType;

Shortcut hook to get the Uploady Context instance

info

alias for useUploadyContext

caution

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>
);