{"repo":"kqito/use-tus","free":true,"listed":false,"github":"https://github.com/kqito/use-tus","clone":"git clone https://github.com/kqito/use-tus.git","description":"React hooks for resumable file uploads using tus","language":"TypeScript","stars":120,"topics":["react","react-hooks","tus","tus-js-client","hooks"],"license":"MIT","category":"ui-components","readme_excerpt":"use-tus React hooks for resumable file uploads using tus . Features - Resumable file uploads in React. - Improved file upload management within the React component lifecycle. - Lightweight and simple interface hooks. - Manage Upload instances via context. - TypeScript support. Demo Try out the use-tus demo. Installation Install the package using your package manager of choice. Usage Below is an example of how to use useTus . API useTus hooks useTus is a hooks that creates an object to perform Resumable file upload. Arguments - autoAbort (type: boolean undefined ) (default: true) - Whether or not to automatically abort uploads when useTus hooks is unmounted. - autoStart (type: boolean undefined ) (default: false) - Whether or not to start upload the file after setUpload function. - uploadOptions (type: TusHooksUploadFnOptions undefined ) (default: undefined) - Option to used by upload object that generated by that hooks. - Upload (type: Upload undefined ) (default: undefined) - Option to specify customized own Upload class with this hooks. uploadOptions This option extends the UploadOptions provided by tus-js-client , allowing every callback to receive the upload instance as the final argument. For detailed type information on UploadOptions , see here. Example: Returns - upload (type: tus.Upload undefined ) - Used for resumable file uploads. Undefined unless setUpload is called. - For detailed usage, see here. - setUpload (type: (file: tus.Upload['file'], options?: TusHooksUpl","default_branch":null,"files":null,"tree":[],"storefront":"/r/kqito","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kqito/use-tus/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}