Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Update dependency axios-hooks to v2 #407

Merged
merged 1 commit into from Jun 29, 2020
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 27, 2020

This PR contains the following updates:

Package Type Update Change
axios-hooks dependencies major 1.11.0 -> 2.0.0

Release Notes

simoneb/axios-hooks

v2.0.0

Compare Source

⚠ BREAKING CHANGES
  • This release introduces a fundamental change in the caching mechanism.

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 always
skipping 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:

<button onClick={refetch} />

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
  • store response in cache when skipping cache for request (fff9ffe)

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the renovate label Jun 27, 2020
@netlify
Copy link

netlify bot commented Jun 27, 2020

Deploy preview for catwalk-qlikcore ready!

Built with commit fe1b45b

https://deploy-preview-407--catwalk-qlikcore.netlify.app

@renovate renovate bot force-pushed the renovate/axios-hooks-2.x branch from 6010404 to 7346040 Compare June 27, 2020 01:27
@renovate renovate bot force-pushed the renovate/axios-hooks-2.x branch from 7346040 to fe1b45b Compare June 29, 2020 01:37
@axelssonHakan axelssonHakan merged commit 1e44f9b into master Jun 29, 2020
@axelssonHakan axelssonHakan deleted the renovate/axios-hooks-2.x branch June 29, 2020 05:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants