v0.6.0
Overview
By #31
- Remove the
useTusfunction to save to store usingcacheKey - Add
useTusStorehooks that has to save to store functionality. - Remove invalid props
canStoreUrlsfromTusClientProvider
Migrating from 0.5 to 0.6
If you use cacheKey options in useTus hooks
The useTus hooks have been removed the state management functionality using TusClientProvider and cacheKey option.
Therefore, if you are currently using useTus hooks with cacheKey option, you will need to change to use the newly added useTusStore hooks.
import { useTusStore } from 'use-tus'
// Old usage
const { upload } = useTus({ cacheKey: 'hogehoge', autoAbort: true })
// New usage
const { upload } = useTusStore('hogehoge', { autoAbort: true })The return value of each hooks is the same, so there is no need to make any other changes
If you not use cacheKey options in useTus hooks
If you are using use-tus and not using the cacheKey option, you no longer need to specify TusClientProvider.
So please consider removing TusClientProvider from the parent comport if necessary.