Skip to content

Latest commit

 

History

History
363 lines (168 loc) · 15.8 KB

CHANGELOG.md

File metadata and controls

363 lines (168 loc) · 15.8 KB

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.6.2 (2022-02-21)

Bug Fixes

  • deps: update dependency object-hash to v3 (a1fd224)

0.6.1 (2022-01-10)

Features

  • add fromCache to response to tell if current data is from cache or not (84c280c)

Bug Fixes

  • allows options being omitted in createFetcher() with requestCreator (a77afa9)

0.6.0 (2021-09-16)

⚠ BREAKING CHANGES

  • remove createXXXHook() and useXXXCreator() hooks

Features

  • 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)

Features

  • support using url directly for createFetcher() and useSWR() (949b54c)

0.5.8 (2021-07-12)

Features

  • add isRefreshing state to usePaginationList() (2a883cb)

Bug Fixes

  • implement useRerender() by useReducer() (9ca17eb)

0.5.7 (2021-06-03)

Bug Fixes

  • hooks: ignore abort error when update hooks state on error (0c15a87)

0.5.6 (2021-05-31)

Bug Fixes

  • revert "replace useEffect with useLayoutEffect for memo hooks" (9c6eca2)

0.5.5 (2021-05-31)

Bug Fixes

  • 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)

Bug Fixes

  • expose useShallowEqualMemo(), useDeepEqualMemo() to hooks entry file (c34385a)
  • update ref value in useEffect() for memo hooks (c1a747e)

0.5.3 (2021-04-20)

Bug Fixes

  • use fast-deep-equal replace lodash.isequal (8b3ab3e)

0.5.2 (2021-03-16)

Bug Fixes

  • ignore request object prototype in default cache key (f31bccf)

0.5.1 (2021-03-09)

Features

  • add getInitialResponse() util method (c1adce9)

0.5.0 (2021-02-23)

⚠ BREAKING CHANGES

  • storage: switch to @react-native-async-storage/async-storage package for async-storage

Bug Fixes

  • storage: switch to @react-native-async-storage/async-storage package for async-storage (aa43079)

0.4.0 (2021-02-01)

⚠ BREAKING CHANGES

  • 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)

Bug Fixes

  • usePaginationList() do not abort previous ongoing load request when loadMore() being called (32f814b)

0.3.12 (2020-12-04)

Bug Fixes

  • make log configurable for each request (1a77de3)

0.3.11 (2020-11-04)

Bug Fixes

  • hooks: useSWR resumes previous pending refresh request if it's aborted by rerender (8603ce7)

0.3.10 (2020-10-28)

Bug Fixes

  • cache control should consider NoCache and NoStore cases as no fresh cache (77f87e1)

0.3.9 (2020-10-28)

Bug Fixes

  • refresh@useSWR() will try to keep the most important refresh request with comparing the cacheMode (38e5f4f)

0.3.8 (2020-10-27)

Features

  • support CacheMode.ForceLoad (9a0f22e)

0.3.7 (2020-10-26)

Bug Fixes

  • swr hook should not abort previous request if new refresh call comes with the same request & options (a7cbd13)

0.3.6 (2020-10-23)

Bug Fixes

  • useSWR may reset the state after response received (a34b706)

0.3.5 (2020-10-20)

Features

  • optimize render performance for usePaginationList() (561c3e1)

0.3.4 (2020-10-20)

Bug Fixes

  • remove debug log for rerender (64a929b)

0.3.3 (2020-10-20)

Features

  • improve the refresh render performance for useSWR hook by skip unnecessary rerender (5d4df2f)

Bug Fixes

  • 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)

Bug Fixes

  • types: support cacheKeyPrefix, cacheMinFresh, cacheMaxAge in RequestOptions (104dcc3)

0.3.1 (2020-09-19)

Bug Fixes

  • export state types for hooks (0382da3)

0.3.0 (2020-07-27)

⚠ BREAKING CHANGES

  • remove cache key prefix delimiter :

  • remove retryOnError option, use retryTimes > 0 to turn on the retry

  • forEachResponse() takes 2 params now - fetch() return and handler - and returns the abort() method

  • remove retryOnError option, use retryTimes > 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)

Bug Fixes

  • make request/options params optional for createXXXHook() (bdf0816)

0.2.7 (2020-05-30)

Bug Fixes

  • correct SWR wrapper hook name (74b8eef)

0.2.6 (2020-05-30)

Features

  • add createXXXHook() and useXXXHookCreator() to hooks (13cd1df)

0.2.5 (2020-05-18)

Bug Fixes

  • expose the response data in usePaginationList() returns (1a38f88)

0.2.4 (2020-05-18)

Features

  • add refresh() and manualStart to useSWR() 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)

Bug Fixes

  • fallbackToPureFetch() should throw on error (416397b)

0.2.2 (2020-05-09)

0.2.1 (2020-05-08)

Features

  • add util function fallbackToPureFetch() (cf3d1e2)

0.2.0 (2020-04-01)

⚠ BREAKING CHANGES

  • rename option logger to log

Bug Fixes

  • do not send remote request to revalidate cache for ForceCache (d7f3891)

  • rename option logger to log (3b9fac6)

0.1.1 (2020-03-29)

Features

Bug Fixes

  • add deep memo for request, options for hooks and use md5 hash for default cache key (8d026d8)

0.1.0 (2020-03-28)

⚠ BREAKING CHANGES

  • add BackoffMode.JitteredExponential and use it as default

Features

  • 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)

Features

  • add clearCache() to fetcher (a8ac9c5)
  • implement retry on error options (c170314)

Bug Fixes

  • 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)

Features

  • add cache interface and implementations (01b5271)
  • add useSWR() hook (d510664)
  • implement basic fetcher (b8949cc)

Bug Fixes

  • null check for fetch() without request and options and update docs (0ee7ddc)

0.0.1 (2020-03-15)