Remove the useTus function to save to store using cacheKey
Add useTusStore hooks that has to save to store using cacheKey
Remove invalid props canStoreUrls from TusClientProvider
Split useTus hooks function into two hooks
The functionality of the conventional useTus hooks has been split into two hooks.
useTus hooks: Simple tus generator using useState.
useTusStore hooks: Tus generator with store function in TusClientStore
The previous useTus hooks was dependent on the TusClientProvider and could only be used if the Context was specified as the parent component.
I believe that there are use cases where you want to simply use tus without using Context for file uploading using Tus in React.
Therefore, I have changed the functionality of useTus hooks so that it does not depend on Context. Conversely, useTusStore hooks can be used for use cases where you want to manage tus stores using context.
Overview
This PR has some breaking changes.
useTus
function to save to store usingcacheKey
useTusStore
hooks that has to save to store usingcacheKey
canStoreUrls
fromTusClientProvider
Split
useTus
hooks function into two hooksThe functionality of the conventional
useTus
hooks has been split into two hooks.useTus
hooks: Simpletus
generator using useState.useTusStore
hooks:Tus
generator with store function inTusClientStore
The previous
useTus
hooks was dependent on theTusClientProvider
and could only be used if the Context was specified as the parent component.I believe that there are use cases where you want to simply use
tus
without using Context for file uploading usingTus
in React.Therefore, I have changed the functionality of
useTus
hooks so that it does not depend on Context. Conversely,useTusStore
hooks can be used for use cases where you want to managetus
stores using context.