⚠ This file is deprecated. Releases after 3.0.0 use GitHub's built-in releases to track changes ⚠
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
3.0.0 (2021-10-31)
- requires axios@^0.24.0
2.7.0 (2021-08-29)
2.6.3 (2021-05-17)
2.6.2 (2021-05-13)
- deps: update dependency @babel/runtime to v7.13.17 (259ea08)
2.6.1 (2021-03-30)
2.6.0 (2021-03-28)
- reset hook state when config changes with outstanding manual fetch (8b2f166)
- update the hook state when cancelled manually (203541b)
2.5.1 (2021-03-28)
- typings: expose return type of useAxios (3273ba1)
2.5.0 (2021-03-12)
2.5.0-0 (2021-03-06)
- no config serialization (15fe158)
- tests (4176d94)
2.4.1 (2021-03-06)
- regression in config serialization (c5e8645)
2.4.0 (2021-03-05)
- remove config serialization (06a8197)
2.4.0-0 (2021-02-12)
- add two more tests of the cancel method (9612292)
- return the cancelOutstandingRequest method in the index after the refetch method (c6346c0)
2.3.0 (2021-01-14)
- default options (b218e68)
2.2.0 (2020-11-18)
- deps: update dependency lru-cache to v6 (e589be6)
- typings: improve typing of the error and response properties on ResponseValues (4479a90)
2.1.0 (2020-07-04)
2.0.0 (2020-06-24)
- 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.
- store response in cache when skipping cache for request (fff9ffe)
1.11.0 (2020-06-21)
1.10.1 (2020-06-21)
- optimize re-rendering with correct initState (d7aef70)
1.10.0 (2020-04-13)
1.10.0-0 (2020-04-11)
1.9.0 (2019-12-12)
- src/index.d.ts: export useAxios related interfaces (6f0fa2a)
1.8.0 (2019-12-06)
- correct @babel/preset-react version (181ddcf)
1.8.0-2 (2019-12-06)
- ts definitions for makeUseAxios (13b20cc)
1.8.0-1 (2019-12-06)
- ts definitions for makeUseAxios (bbdb3e0)
1.8.0-0 (2019-11-30)
1.7.2 (2019-11-13)
- do not dispatch state updates when requests are cancelled (307c7c1), closes #74
- use StaticAxios for cancellation as AxiosInstance doesn't expose it (4a63b6e), closes #80
- deps: update dependency @babel/runtime to v7.7.2 (ebeab51)
1.7.2-0 (2019-11-10)
1.7.1 (2019-11-07)
- build: include typings in package (0b43f5e)
1.7.0 (2019-11-07)
- support request cancellation (8cf1f74)
1.6.0 (2019-10-23)
1.5.0 (2019-10-23)
1.5.0-0 (2019-10-22)
- maintain referential integrity of refetch function (1c4c5ac)
- typing of serializeCache function (3040b80)
1.4.1 (2019-10-19)
- do not execute manual requests on server (88829b0)
1.4.0 (2019-10-12)
Features
- Add useCache option
1.3.0 (2019-08-05)
1.2.1 (2019-07-21)
1.2.0 (2019-07-18)
1.1.5 (2019-07-16)
1.1.4 (2019-07-14)
1.1.3 (2019-07-12)
1.1.2 (2019-06-30)
1.1.1 (2019-06-30)
- Add tests (a1412a5)
1.1.0 (2019-05-25)
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.