This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
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.
This PR contains the following updates:
1.11.0
->2.0.0
Release Notes
simoneb/axios-hooks
v2.0.0
Compare Source
⚠ BREAKING CHANGES
The main difference is that requests that don't use the cache
will store the response in the cache anyway, making the behavior
of the library more intuitive and predictable.
In other words,
{ useCache: false }
will only skip reading from the cache,but it will write the response to the cache in any case.
The docs contain a caching example providing a full overview of
how the new caching behavior works.
A potential side effect of the new behavior, which we tried mitigating,
is that the
refetch
function returned by the hook, which was alwaysskipping the cache previously, now stores the response in cache.
Because of this, it must generate a key for the cache, which is created
based on the configuration provided as the first argument to the
refetch
function itself.
Because the
refetch
function is often provided directly to DOM event handlers:this would no longer work because the first argument will be the React event and
we cannot generate a cache key from that, and it wouldn't make much sense either.
Because this is a fairly common scenario, we implemented a specific handling for
this case. If the first argument is an event, it is ignored and considered as if
no configuration override was provided.
Features
Renovate configuration
📅 Schedule: "every weekend" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.