New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(useFetch): introduce updateDataOnError
option
#3092
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
climba03003
force-pushed
the
allow-return-data-on-error
branch
5 times, most recently
from
May 16, 2023 23:15
ff54312
to
ab1a156
Compare
5 tasks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
antfu
reviewed
Jul 30, 2023
climba03003
force-pushed
the
allow-return-data-on-error
branch
from
July 31, 2023 09:00
790f171
to
2affb39
Compare
mu16zi
approved these changes
Aug 7, 2023
antfu
changed the title
feat(useFetch): allow return data on fetch error
feat(useFetch): introduce Aug 25, 2023
updateDataOnFetchError
option
antfu
changed the title
feat(useFetch): introduce
feat(useFetch): introduce Aug 25, 2023
updateDataOnFetchError
optionupdateDataOnError
option
Made a few updates:
|
antfu
approved these changes
Aug 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting the PR, please make sure you do the following
fixes #123
).Description
Revert the behavior introduced in #2711, since it is a breaking change. I don't mind the default changed to
false
in next release, but it shouldn't bev10
.Introduce new configuration
allowFetchErrorReturnData
to configure the behavior ofonFetchError
. If anyone don't like thedata
being replaced by this hook, just set it tofalse
or returndata
asnull
.Additional context
🤖 Generated by Copilot at a3bf42f
This pull request adds a new feature to the
useFetch
function, which enables theonFetchError
hook to return data in case of a fetch error. It updates theUseFetchOptions
interface, theuseFetch
andcreateFetch
functions, and the corresponding tests and documentation inpackages/core/useFetch
.🤖 Generated by Copilot at a3bf42f