All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
0.6.2 (2022-02-21)
- deps: update dependency object-hash to v3 (a1fd224)
0.6.1 (2022-01-10)
- add
fromCache
to response to tell if current data is from cache or not (84c280c)
- allows options being omitted in createFetcher() with requestCreator (a77afa9)
0.6.0 (2021-09-16)
- remove
createXXXHook()
anduseXXXCreator()
hooks
-
support using url for usePolling() hook (f748ab3)
-
usePaginationList() supports using anonymouse listExtractor, nextRequestCreator (137ccdc)
-
usePaginationList() hook takes a DataHandler replace previous ListExtractor and NextRequestCreator params (5fb5d4e)
0.5.9 (2021-08-24)
- support using url directly for createFetcher() and useSWR() (949b54c)
0.5.8 (2021-07-12)
- add isRefreshing state to usePaginationList() (2a883cb)
- implement useRerender() by useReducer() (9ca17eb)
0.5.7 (2021-06-03)
- hooks: ignore abort error when update hooks state on error (0c15a87)
0.5.6 (2021-05-31)
- revert "replace useEffect with useLayoutEffect for memo hooks" (9c6eca2)
0.5.5 (2021-05-31)
- deps: update jest, ts-jest to v27 (bf0f295)
- deps: update object-hash to 2.2.0 (577a3f4)
- export react utiles useRerender(), isDeepEqual(), isShallowEqual() (8466119)
- replace useEffect with useLayoutEffect for memo hooks (3e5df10)
0.5.4 (2021-05-21)
- expose useShallowEqualMemo(), useDeepEqualMemo() to hooks entry file (c34385a)
- update ref value in useEffect() for memo hooks (c1a747e)
0.5.3 (2021-04-20)
- use fast-deep-equal replace lodash.isequal (8b3ab3e)
0.5.2 (2021-03-16)
- ignore request object prototype in default cache key (f31bccf)
0.5.1 (2021-03-09)
- add getInitialResponse() util method (c1adce9)
0.5.0 (2021-02-23)
- storage: switch to @react-native-async-storage/async-storage package for async-storage
- storage: switch to @react-native-async-storage/async-storage package for async-storage (aa43079)
0.4.0 (2021-02-01)
-
FetcherOptions, RequestOptions, PaginationListOptions, PollingOptions, SWROptions are no longer generic classes
-
update types, remove the use of any type and simplify Options types by remove generics (2ad8cbd)
0.3.13 (2021-01-23)
- usePaginationList() do not abort previous ongoing load request when loadMore() being called (32f814b)
0.3.12 (2020-12-04)
- make log configurable for each request (1a77de3)
0.3.11 (2020-11-04)
- hooks: useSWR resumes previous pending refresh request if it's aborted by rerender (8603ce7)
0.3.10 (2020-10-28)
- cache control should consider NoCache and NoStore cases as no fresh cache (77f87e1)
0.3.9 (2020-10-28)
- refresh@useSWR() will try to keep the most important refresh request with comparing the cacheMode (38e5f4f)
0.3.8 (2020-10-27)
- support CacheMode.ForceLoad (9a0f22e)
0.3.7 (2020-10-26)
- swr hook should not abort previous request if new refresh call comes with the same request & options (a7cbd13)
0.3.6 (2020-10-23)
- useSWR may reset the state after response received (a34b706)
0.3.5 (2020-10-20)
- optimize render performance for usePaginationList() (561c3e1)
0.3.4 (2020-10-20)
- remove debug log for rerender (64a929b)
0.3.3 (2020-10-20)
- improve the refresh render performance for useSWR hook by skip unnecessary rerender (5d4df2f)
- calling fetch() immediately after clearCache() on fetcher should not get cached response (099fd10)
- getFinalResponse() resolves if there is no error in last response (0439372)
0.3.2 (2020-09-24)
- types: support
cacheKeyPrefix
,cacheMinFresh
,cacheMaxAge
inRequestOptions
(104dcc3)
0.3.1 (2020-09-19)
- export state types for hooks (0382da3)
0.3.0 (2020-07-27)
-
remove cache key prefix delimiter
:
-
remove
retryOnError
option, useretryTimes > 0
to turn on the retry -
forEachResponse() takes 2 params now - fetch() return and handler - and returns the abort() method
-
remove
retryOnError
option, useretryTimes > 0
to turn on the retry (ad2a633) -
remove cache key prefix delimiter
:
(273eef4) -
update the forEachResponse() util function (e14c76c)
0.2.8 (2020-05-30)
- make request/options params optional for createXXXHook() (bdf0816)
0.2.7 (2020-05-30)
- correct SWR wrapper hook name (74b8eef)
0.2.6 (2020-05-30)
- add createXXXHook() and useXXXHookCreator() to hooks (13cd1df)
0.2.5 (2020-05-18)
- expose the response data in usePaginationList() returns (1a38f88)
0.2.4 (2020-05-18)
- add
refresh()
andmanualStart
touseSWR()
return / options (19848c1) - add clearCache() util function to prune cache by removing keys that older than given max age (aa1e777)
- add react hooks: usePaginationList() (fce868b)
0.2.3 (2020-05-13)
- fallbackToPureFetch() should throw on error (416397b)
0.2.2 (2020-05-09)
0.2.1 (2020-05-08)
- add util function fallbackToPureFetch() (cf3d1e2)
0.2.0 (2020-04-01)
- rename option
logger
tolog
-
do not send remote request to revalidate cache for ForceCache (d7f3891)
-
rename option
logger
tolog
(3b9fac6)
0.1.1 (2020-03-29)
- add usePolling hook (306f9a0)
- add deep memo for request, options for hooks and use md5 hash for default cache key (8d026d8)
0.1.0 (2020-03-28)
- add BackoffMode.JitteredExponential and use it as default
- add BackoffMode.JitteredExponential and use it as default (4646ba9)
- add logger option to fetcher (214595a)
- implement the polling request (8c1f0ab)
0.0.3 (2020-03-26)
- loading status should turn to false when request failed without any cached data (693776d)
- skip swr resolve empty cache, wait for the network fetch returns for this case (ada3e95)
- swr response promise reject immediately after abort() being called (26491c6)
- useSWR() hook keeps previous cached data even if followed revalidating request failed (91df101)
0.0.2 (2020-03-21)
- add cache interface and implementations (01b5271)
- add useSWR() hook (d510664)
- implement basic fetcher (b8949cc)
- null check for fetch() without request and options and update docs (0ee7ddc)