Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kqito
Copy link
Owner

@kqito kqito commented Mar 26, 2022

Overview

This PR has some breaking changes.

  • 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.

@kqito kqito self-assigned this Mar 26, 2022
@kqito kqito changed the title Add use-tus-store hooks Split useTus hooks function into two hooks Mar 26, 2022
@kqito kqito marked this pull request as ready for review March 26, 2022 11:20
@kqito kqito force-pushed the split-into-use-tus-store branch 2 times, most recently from 2b59d2d to ab6ccbb Compare March 26, 2022 11:27
@kqito kqito force-pushed the split-into-use-tus-store branch from ab6ccbb to a6c6042 Compare March 26, 2022 11:28
@kqito kqito merged commit dcd0648 into main Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants