Skip to content

Releases: vitorbertolucci/react-cached-fetch

Version 1.4.0

10 Dec 20:31
Compare
Choose a tag to compare

Implements optional cache persistence in sessionStorage or localStorage

Version 1.3.0

04 Dec 17:26
Compare
Choose a tag to compare
  • Implements generic typing
  • Fixes useCachedFetch behavior by throwing an error when the default fetcher function fails to retrieve data
  • Prevents useEffect loop with memoization
  • Changes header property type to {[key: string]: string}
  • Updated readme

Implements dependencies option

02 Nov 22:51
Compare
Choose a tag to compare

Implements a new option for both global options or hook options called dependencies. This option receives an array of boolean values and waits until all of the are true before calling the fetcher function.

Implements initialValue option

02 Nov 22:52
Compare
Choose a tag to compare

Implements a new option for both global options or hook options called initialValue. This option defines the initial value for the data property returned by the hook while the fetch request isn't fulfilled.